core.hpp File Reference


#include " opencv2/core/cvdef.h "
#include " opencv2/core/version.hpp "
#include " opencv2/core/base.hpp "
#include " opencv2/core/cvstd.hpp "
#include " opencv2/core/traits.hpp "
#include " opencv2/core/matx.hpp "
#include " opencv2/core/types.hpp "
#include " opencv2/core/mat.hpp "
#include " opencv2/core/persistence.hpp "
#include " opencv2/core/operations.hpp "
#include "opencv2/core/cvstd.inl.hpp"
#include " opencv2/core/utility.hpp "
#include " opencv2/core/optim.hpp "
#include " opencv2/core/ovx.hpp "

class   cv::Algorithm
  This is a base class for all more or less complex algorithms in OpenCV. 更多...
 
class   cv::Exception
  Class passed to an error. 更多...
 
class   cv::Formatted
 
class   cv::Formatter
 
class   cv::LDA
  线性判别分析。 更多...
 
struct   cv::ParamType< _Tp, _EnumTp >
 
struct   cv::ParamType< _Tp, typename std::enable_if< std::is_enum< _Tp >::value >::type >
 
struct   cv::ParamType< Algorithm >
 
struct   cv::ParamType< bool >
 
struct   cv::ParamType< double >
 
struct   cv::ParamType< float >
 
struct   cv::ParamType< Mat >
 
struct   cv::ParamType< Scalar >
 
struct   cv::ParamType< std::vector< Mat > >
 
struct   cv::ParamType< String >
 
struct   cv::ParamType< uchar >
 
struct   cv::ParamType< uint64 >
 
struct   cv::ParamType< unsigned >
 
class   cv::PCA
  Principal Component Analysis. 更多...
 
class   cv::RNG
  Random Number Generator. 更多...
 
class   cv::RNG_MT19937
  Mersenne Twister random number generator. 更多...
 
class   cv::SVD
  Singular Value Decomposition. 更多...
 

名称空间

  cv
  "black box" representation of the file storage associated with a file on disk.
 

枚举

enum   cv::CovarFlags {
   cv::COVAR_SCRAMBLED = 0,
   cv::COVAR_NORMAL = 1,
   cv::COVAR_USE_AVG = 2,
   cv::COVAR_SCALE = 4,
   cv::COVAR_ROWS = 8,
   cv::COVAR_COLS = 16
}
  Covariation flags. 更多...
 
enum   cv::KmeansFlags {
   cv::KMEANS_RANDOM_CENTERS = 0,
   cv::KMEANS_PP_CENTERS = 2,
   cv::KMEANS_USE_INITIAL_LABELS = 1
}
  k-Means flags 更多...
 
enum   cv::Param {
   cv::Param::INT =0,
   cv::Param::BOOLEAN =1,
   cv::Param::REAL =2,
   cv::Param::STRING =3,
   cv::Param::MAT =4,
   cv::Param::MAT_VECTOR =5,
   cv::Param::ALGORITHM =6,
   cv::Param::FLOAT =7,
   cv::Param::UNSIGNED_INT =8,
   cv::Param::UINT64 =9,
   cv::Param::UCHAR =11,
   cv::Param::SCALAR =12
}
 
enum   cv::ReduceTypes {
   cv::REDUCE_SUM = 0,
   cv::REDUCE_AVG = 1,
   cv::REDUCE_MAX = 2,
   cv::REDUCE_MIN = 3
}
 
enum   cv::RotateFlags {
   cv::ROTATE_90_CLOCKWISE = 0,
   cv::ROTATE_180 = 1,
   cv::ROTATE_90_COUNTERCLOCKWISE = 2
}
 
enum   cv::SortFlags {
   cv::SORT_EVERY_ROW = 0,
   cv::SORT_EVERY_COLUMN = 1,
   cv::SORT_ASCENDING = 0,
   cv::SORT_DESCENDING = 16
}
 

函数

void  cv::absdiff (InputArray src1, InputArray src2, OutputArray dst)
  Calculates the per-element absolute difference between two arrays or between an array and a scalar. 更多...
 
void  cv::add (InputArray src1, InputArray src2, OutputArray dst, InputArray mask=noArray(), int dtype=-1)
  Calculates the per-element sum of two arrays or an array and a scalar. 更多...
 
void  cv::addWeighted (InputArray src1, double alpha, InputArray src2, double beta, double gamma, OutputArray dst, int dtype=-1)
  Calculates the weighted sum of two arrays. 更多...
 
void  cv::batchDistance (InputArray src1, InputArray src2, OutputArray dist, int dtype, OutputArray nidx, int normType=NORM_L2, int K=0, InputArray mask=noArray(), int update=0, bool crosscheck=false)
  naive nearest neighbor finder 更多...
 
void  cv::bitwise_and (InputArray src1, InputArray src2, OutputArray dst, InputArray mask=noArray())
  computes bitwise conjunction of the two arrays (dst = src1 & src2) Calculates the per-element bit-wise conjunction of two arrays or an array and a scalar. 更多...
 
void  cv::bitwise_not (InputArray src, OutputArray dst, InputArray mask=noArray())
  Inverts every bit of an array. 更多...
 
void  cv::bitwise_or (InputArray src1, InputArray src2, OutputArray dst, InputArray mask=noArray())
  Calculates the per-element bit-wise disjunction of two arrays or an array and a scalar. 更多...
 
void  cv::bitwise_xor (InputArray src1, InputArray src2, OutputArray dst, InputArray mask=noArray())
  Calculates the per-element bit-wise "exclusive or" operation on two arrays or an array and a scalar. 更多...
 
int  cv::borderInterpolate (int p, int len, int borderType)
  Computes the source location of an extrapolated pixel. 更多...
 
void  cv::calcCovarMatrix (const Mat *samples, int nsamples, Mat &covar, Mat &mean, int flags, int ctype= CV_64F )
  Calculates the covariance matrix of a set of vectors. 更多...
 
void  cv::calcCovarMatrix (InputArray samples, OutputArray covar, InputOutputArray mean, int flags, int ctype= CV_64F )
 
void  cv::cartToPolar (InputArray x, InputArray y, OutputArray magnitude, OutputArray angle, bool angleInDegrees=false)
  Calculates the magnitude and angle of 2D vectors. 更多...
 
bool  cv::checkRange (InputArray a, bool quiet=true, Point *pos=0, double minVal=-DBL_MAX, double maxVal=DBL_MAX)
  Checks every element of an input array for invalid values. 更多...
 
void  cv::compare (InputArray src1, InputArray src2, OutputArray dst, int cmpop)
  Performs the per-element comparison of two arrays or an array and scalar value. 更多...
 
void  cv::completeSymm (InputOutputArray m, bool lowerToUpper=false)
  Copies the lower or the upper half of a square matrix to its another half. 更多...
 
void  cv::convertFp16 (InputArray src, OutputArray dst)
  把数组转换成半精度浮点数。 更多...
 
void  cv::convertScaleAbs (InputArray src, OutputArray dst, double alpha=1, double beta=0)
  Scales, calculates absolute values, and converts the result to 8-bit. 更多...
 
void  cv::copyMakeBorder (InputArray src, OutputArray dst, int top, int bottom, int left, int right, int borderType, const Scalar &value=Scalar())
  Forms a border around an image. 更多...
 
void  cv::copyTo (InputArray src, OutputArray dst, InputArray mask)
  This is an overloaded member function, provided for convenience (python) Copies the matrix to another one. When the operation mask is specified, if the Mat::create call shown above reallocates the matrix, the newly allocated matrix is initialized with all zeros before copying the data. 更多...
 
int  cv::countNonZero (InputArray src)
  Counts non-zero array elements. 更多...
 
void  cv::dct (InputArray src, OutputArray dst, int flags=0)
  Performs a forward or inverse discrete Cosine transform of 1D or 2D array. 更多...
 
double  cv::determinant (InputArray mtx)
  Returns the determinant of a square floating-point matrix. 更多...
 
void  cv::dft (InputArray src, OutputArray dst, int flags=0, int nonzeroRows=0)
  Performs a forward or inverse Discrete Fourier transform of a 1D or 2D floating-point array. 更多...
 
void  cv::divide (InputArray src1, InputArray src2, OutputArray dst, double scale=1, int dtype=-1)
  Performs per-element division of two arrays or a scalar by an array. 更多...
 
void  cv::divide (double scale, InputArray src2, OutputArray dst, int dtype=-1)
 
bool  cv::eigen (InputArray src, OutputArray eigenvalues, OutputArray eigenvectors=noArray())
  Calculates eigenvalues and eigenvectors of a symmetric matrix. 更多...
 
void  cv::eigenNonSymmetric (InputArray src, OutputArray eigenvalues, OutputArray eigenvectors)
  Calculates eigenvalues and eigenvectors of a non-symmetric matrix (real eigenvalues only). 更多...
 
void  cv::error (const Exception &exc)
  Signals an error and raises the exception. 更多...
 
void  cv::exp (InputArray src, OutputArray dst)
  Calculates the exponent of every array element. 更多...
 
void  cv::extractChannel (InputArray src, OutputArray dst, int coi)
  Extracts a single channel from src (coi is 0-based index) 更多...
 
void  cv::findNonZero (InputArray src, OutputArray idx)
  Returns the list of locations of non-zero pixels. 更多...
 
void  cv::flip (InputArray src, OutputArray dst, int flipCode)
  Flips a 2D array around vertical, horizontal, or both axes. 更多...
 
void  cv::gemm (InputArray src1, InputArray src2, double alpha, InputArray src3, double beta, OutputArray dst, int flags=0)
  Performs generalized matrix multiplication. 更多...
 
int  cv::getOptimalDFTSize (int vecsize)
  Returns the optimal DFT size for a given vector size. 更多...
 
void  cv::hconcat (const Mat *src, size_t nsrc, OutputArray dst)
  Applies horizontal concatenation to given matrices. 更多...
 
void  cv::hconcat (InputArray src1, InputArray src2, OutputArray dst)
 
void  cv::hconcat (InputArrayOfArrays src, OutputArray dst)
 
void  cv::idct (InputArray src, OutputArray dst, int flags=0)
  Calculates the inverse Discrete Cosine Transform of a 1D or 2D array. 更多...
 
void  cv::idft (InputArray src, OutputArray dst, int flags=0, int nonzeroRows=0)
  Calculates the inverse Discrete Fourier Transform of a 1D or 2D array. 更多...
 
void  cv::inRange (InputArray src, InputArray lowerb, InputArray upperb, OutputArray dst)
  Checks if array elements lie between the elements of two other arrays. 更多...
 
void  cv::insertChannel (InputArray src, InputOutputArray dst, int coi)
  Inserts a single channel to dst (coi is 0-based index) 更多...
 
double  cv::invert (InputArray src, OutputArray dst, int flags=DECOMP_LU)
  Finds the inverse or pseudo-inverse of a matrix. 更多...
 
double  cv::kmeans (InputArray data, int K, InputOutputArray bestLabels, TermCriteria criteria, int attempts, int flags, OutputArray centers=noArray())
  Finds centers of clusters and groups input samples around the clusters. 更多...
 
void  cv::log (InputArray src, OutputArray dst)
  Calculates the natural logarithm of every array element. 更多...
 
void  cv::LUT (InputArray src, InputArray lut, OutputArray dst)
  Performs a look-up table transform of an array. 更多...
 
void  cv::magnitude (InputArray x, InputArray y, OutputArray magnitude)
  Calculates the magnitude of 2D vectors. 更多...
 
double  cv::Mahalanobis (InputArray v1, InputArray v2, InputArray icovar)
  Calculates the Mahalanobis distance between two vectors. 更多...
 
void  cv::max (InputArray src1, InputArray src2, OutputArray dst)
  Calculates per-element maximum of two arrays or an array and a scalar. 更多...
 
void  cv::max (const Mat &src1, const Mat &src2, Mat &dst)
 
void  cv::max (const UMat &src1, const UMat &src2, UMat &dst)
 
Scalar  cv::mean (InputArray src, InputArray mask=noArray())
  Calculates an average (mean) of array elements. 更多...
 
void  cv::meanStdDev (InputArray src, OutputArray mean, OutputArray stddev, InputArray mask=noArray())
 
void  cv::merge (const Mat *mv, size_t count, OutputArray dst)
  Creates one multi-channel array out of several single-channel ones. 更多...
 
void  cv::merge (InputArrayOfArrays mv, OutputArray dst)
 
void  cv::min (InputArray src1, InputArray src2, OutputArray dst)
  Calculates per-element minimum of two arrays or an array and a scalar. 更多...
 
void  cv::min (const Mat &src1, const Mat &src2, Mat &dst)
 
void  cv::min (const UMat &src1, const UMat &src2, UMat &dst)
 
void  cv::minMaxIdx (InputArray src, double *minVal, double *maxVal=0, int *minIdx=0, int *maxIdx=0, InputArray mask=noArray())
  Finds the global minimum and maximum in an array. 更多...
 
void  cv::minMaxLoc (InputArray src, double *minVal, double *maxVal=0, Point *minLoc=0, Point *maxLoc=0, InputArray mask=noArray())
  Finds the global minimum and maximum in an array. 更多...
 
void  cv::minMaxLoc (const SparseMat &a, double *minVal, double *maxVal, int *minIdx=0, int *maxIdx=0)
 
void  cv::mixChannels (const Mat *src, size_t nsrcs, Mat *dst, size_t ndsts, const int *fromTo, size_t npairs)
  Copies specified channels from input arrays to the specified channels of output arrays. 更多...
 
void  cv::mixChannels (InputArrayOfArrays src, InputOutputArrayOfArrays dst, const int *fromTo, size_t npairs)
 
void  cv::mixChannels (InputArrayOfArrays src, InputOutputArrayOfArrays dst, const std::vector< int > &fromTo)
 
void  cv::mulSpectrums (InputArray a, InputArray b, OutputArray c, int flags, bool conjB=false)
  Performs the per-element multiplication of two Fourier spectrums. 更多...
 
void  cv::multiply (InputArray src1, InputArray src2, OutputArray dst, double scale=1, int dtype=-1)
  Calculates the per-element scaled product of two arrays. 更多...
 
void  cv::mulTransposed (InputArray src, OutputArray dst, bool aTa, InputArray delta=noArray(), double scale=1, int dtype=-1)
  Calculates the product of a matrix and its transposition. 更多...
 
double  cv::norm (InputArray src1, int normType=NORM_L2, InputArray mask=noArray())
  Calculates the absolute norm of an array. 更多...
 
double  cv::norm (InputArray src1, InputArray src2, int normType=NORM_L2, InputArray mask=noArray())
  Calculates an absolute difference norm or a relative difference norm. 更多...
 
double  cv::norm (const SparseMat &src, int normType)
 
void  cv::normalize (InputArray src, InputOutputArray dst, double alpha=1, double beta=0, int norm_type=NORM_L2, int dtype=-1, InputArray mask=noArray())
  Normalizes the norm or value range of an array. 更多...
 
void  cv::normalize (const SparseMat &src, SparseMat &dst, double alpha, int normType)
 
static String &  cv::operator<< (String &out, Ptr< Formatted > fmtd)
 
static String &  cv::operator<< (String &out, const Mat &mtx)
 
void  cv::patchNaNs (InputOutputArray a, double val=0)
  converts NaN's to the given number 更多...
 
void  cv::PCABackProject (InputArray data, InputArray mean, InputArray eigenvectors, OutputArray result)
 
void  cv::PCACompute (InputArray data, InputOutputArray mean, OutputArray eigenvectors, int maxComponents=0)
 
void  cv::PCACompute (InputArray data, InputOutputArray mean, OutputArray eigenvectors, OutputArray eigenvalues, int maxComponents=0)
 
void  cv::PCACompute (InputArray data, InputOutputArray mean, OutputArray eigenvectors, double retainedVariance)
 
void  cv::PCACompute (InputArray data, InputOutputArray mean, OutputArray eigenvectors, OutputArray eigenvalues, double retainedVariance)
 
void  cv::PCAProject (InputArray data, InputArray mean, InputArray eigenvectors, OutputArray result)
 
void  cv::perspectiveTransform (InputArray src, OutputArray dst, InputArray m)
  Performs the perspective matrix transformation of vectors. 更多...
 
void  cv::phase (InputArray x, InputArray y, OutputArray angle, bool angleInDegrees=false)
  Calculates the rotation angle of 2D vectors. 更多...
 
void  cv::polarToCart (InputArray magnitude, InputArray angle, OutputArray x, OutputArray y, bool angleInDegrees=false)
  Calculates x and y coordinates of 2D vectors from their magnitude and angle. 更多...
 
void  cv::pow (InputArray src, double power, OutputArray dst)
  Raises every array element to a power. 更多...
 
double  cv::PSNR (InputArray src1, InputArray src2, double R=255.)
  Computes the Peak Signal-to-Noise Ratio (PSNR) image quality metric. 更多...
 
void  cv::randn (InputOutputArray dst, InputArray mean, InputArray stddev)
  Fills the array with normally distributed random numbers. 更多...
 
void  cv::randShuffle (InputOutputArray dst, double iterFactor=1., RNG *rng=0)
  Shuffles the array elements randomly. 更多...
 
void  cv::randu (InputOutputArray dst, InputArray low, InputArray high)
  Generates a single uniformly-distributed random number or an array of random numbers. 更多...
 
void  cv::reduce (InputArray src, OutputArray dst, int dim, int rtype, int dtype=-1)
  Reduces a matrix to a vector. 更多...
 
void  cv::repeat (InputArray src, int ny, int nx, OutputArray dst)
  Fills the output array with repeated copies of the input array. 更多...
 
Mat  cv::repeat (const Mat &src, int ny, int nx)
 
void  cv::rotate (InputArray src, OutputArray dst, int rotateCode)
  Rotates a 2D array in multiples of 90 degrees. The function cv::rotate rotates the array in one of three different ways: Rotate by 90 degrees clockwise (rotateCode = ROTATE_90_CLOCKWISE). Rotate by 180 degrees clockwise (rotateCode = ROTATE_180). Rotate by 270 degrees clockwise (rotateCode = ROTATE_90_COUNTERCLOCKWISE). 更多...
 
void  cv::scaleAdd (InputArray src1, double alpha, InputArray src2, OutputArray dst)
  Calculates the sum of a scaled array and another array. 更多...
 
void  cv::setIdentity (InputOutputArray mtx, const Scalar &s=Scalar(1))
  Initializes a scaled identity matrix. 更多...
 
void  cv::setRNGSeed (int seed)
  Sets state of default random number generator. 更多...
 
bool  cv::solve (InputArray src1, InputArray src2, OutputArray dst, int flags=DECOMP_LU)
  Solves one or more linear systems or least-squares problems. 更多...
 
int  cv::solveCubic (InputArray coeffs, OutputArray roots)
  Finds the real roots of a cubic equation. 更多...
 
double  cv::solvePoly (InputArray coeffs, OutputArray roots, int maxIters=300)
  Finds the real or complex roots of a polynomial equation. 更多...
 
void  cv::sort (InputArray src, OutputArray dst, int flags)
  Sorts each row or each column of a matrix. 更多...
 
void  cv::sortIdx (InputArray src, OutputArray dst, int flags)
  Sorts each row or each column of a matrix. 更多...
 
void  cv::split (const Mat &src, Mat *mvbegin)
  Divides a multi-channel array into several single-channel arrays. 更多...
 
void  cv::split (InputArray m, OutputArrayOfArrays mv)
 
void  cv::sqrt (InputArray src, OutputArray dst)
  Calculates a square root of array elements. 更多...
 
void  cv::subtract (InputArray src1, InputArray src2, OutputArray dst, InputArray mask=noArray(), int dtype=-1)
  Calculates the per-element difference between two arrays or array and a scalar. 更多...
 
Scalar  cv::sum (InputArray src)
  Calculates the sum of array elements. 更多...
 
void  cv::SVBackSubst (InputArray w, InputArray u, InputArray vt, InputArray rhs, OutputArray dst)
 
void  cv::SVDecomp (InputArray src, OutputArray w, OutputArray u, OutputArray vt, int flags=0)
 
void  cv::swap (Mat &a, Mat &b)
  交换 2 矩阵。 更多...
 
void  cv::swap (UMat &a, UMat &b)
 
RNG &  cv::theRNG ()
  Returns the default random number generator. 更多...
 
Scalar  cv::trace (InputArray mtx)
  Returns the trace of a matrix. 更多...
 
void  cv::transform (InputArray src, OutputArray dst, InputArray m)
  Performs the matrix transformation of every array element. 更多...
 
void  cv::transpose (InputArray src, OutputArray dst)
  Transposes a matrix. 更多...
 
void  cv::vconcat (const Mat *src, size_t nsrc, OutputArray dst)
  Applies vertical concatenation to given matrices. 更多...
 
void  cv::vconcat (InputArray src1, InputArray src2, OutputArray dst)
 
void  cv::vconcat (InputArrayOfArrays src, OutputArray dst)