OpenCV  4.4.0
Open Source Computer Vision
Modules | Namespaces | Classes | Typedefs | Enumerations | Functions
Core functionality

Modules

 Basic structures
 
 C structures and operations
 
 Operations on arrays
 
 Asynchronous API
 
 XML/YAML Persistence
 
 Clustering
 
 Utility and system functions and macros
 
 OpenGL interoperability
 
 Intel IPP Asynchronous C/C++ Converters
 
 Optimization Algorithms
 
 DirectX interoperability
 
 Eigen support
 
 OpenCL support
 
 Intel VA-API/OpenCL (CL-VA) interoperability
 
 Hardware Acceleration Layer
 

Namespaces

 cv::traits
 

Classes

class  cv::Affine3< T >
 Affine transform. More...
 
class  cv::BufferPoolController
 

Typedefs

typedef Affine3< double > cv::Affine3d
 
typedef Affine3< float > cv::Affine3f
 

Enumerations

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. More...
 
enum  cv::KmeansFlags {
  cv::KMEANS_RANDOM_CENTERS = 0,
  cv::KMEANS_PP_CENTERS = 2,
  cv::KMEANS_USE_INITIAL_LABELS = 1
}
 k-Means flags More...
 
enum  cv::ReduceTypes {
  cv::REDUCE_SUM = 0,
  cv::REDUCE_AVG = 1,
  cv::REDUCE_MAX = 2,
  cv::REDUCE_MIN = 3
}
 

Functions

template<typename T >
static Affine3< T > cv::operator* (const Affine3< T > &affine1, const Affine3< T > &affine2)
 
template<typename T , typename V >
static V cv::operator* (const Affine3< T > &affine, const V &vector)
 V is a 3-element vector with member fields x, y and z. More...
 
static Vec3f cv::operator* (const Affine3f &affine, const Vec3f &vector)
 
static Vec3d cv::operator* (const Affine3d &affine, const Vec3d &vector)
 
void cv::swap (Mat &a, Mat &b)
 Swaps two matrices. More...
 
void cv::swap (UMat &a, UMat &b)
 

Detailed Description

Typedef Documentation

◆ Affine3d

typedef Affine3<double> cv::Affine3d

◆ Affine3f

typedef Affine3<float> cv::Affine3f

Enumeration Type Documentation

◆ CovarFlags

#include <opencv2/core.hpp>

Covariation flags.

Enumerator
COVAR_SCRAMBLED 
Python: cv.COVAR_SCRAMBLED

The output covariance matrix is calculated as:

\[\texttt{scale} \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...]^T \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...],\]

The covariance matrix will be nsamples x nsamples. Such an unusual covariance matrix is used for fast PCA of a set of very large vectors (see, for example, the EigenFaces technique for face recognition). Eigenvalues of this "scrambled" matrix match the eigenvalues of the true covariance matrix. The "true" eigenvectors can be easily calculated from the eigenvectors of the "scrambled" covariance matrix.

COVAR_NORMAL 
Python: cv.COVAR_NORMAL

The output covariance matrix is calculated as:

\[\texttt{scale} \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...] \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...]^T,\]

covar will be a square matrix of the same size as the total number of elements in each input vector. One and only one of COVAR_SCRAMBLED and COVAR_NORMAL must be specified.

COVAR_USE_AVG 
Python: cv.COVAR_USE_AVG

If the flag is specified, the function does not calculate mean from the input vectors but, instead, uses the passed mean vector. This is useful if mean has been pre-calculated or known in advance, or if the covariance matrix is calculated by parts. In this case, mean is not a mean vector of the input sub-set of vectors but rather the mean vector of the whole set.

COVAR_SCALE 
Python: cv.COVAR_SCALE

If the flag is specified, the covariance matrix is scaled. In the "normal" mode, scale is 1./nsamples . In the "scrambled" mode, scale is the reciprocal of the total number of elements in each input vector. By default (if the flag is not specified), the covariance matrix is not scaled ( scale=1 ).

COVAR_ROWS 
Python: cv.COVAR_ROWS

If the flag is specified, all the input vectors are stored as rows of the samples matrix. mean should be a single-row vector in this case.

COVAR_COLS 
Python: cv.COVAR_COLS

If the flag is specified, all the input vectors are stored as columns of the samples matrix. mean should be a single-column vector in this case.

◆ KmeansFlags

#include <opencv2/core.hpp>

k-Means flags

Enumerator
KMEANS_RANDOM_CENTERS 
Python: cv.KMEANS_RANDOM_CENTERS

Select random initial centers in each attempt.

KMEANS_PP_CENTERS 
Python: cv.KMEANS_PP_CENTERS

Use kmeans++ center initialization by Arthur and Vassilvitskii [Arthur2007].

KMEANS_USE_INITIAL_LABELS 
Python: cv.KMEANS_USE_INITIAL_LABELS

During the first (and possibly the only) attempt, use the user-supplied labels instead of computing them from the initial centers. For the second and further attempts, use the random or semi-random centers. Use one of KMEANS_*_CENTERS flag to specify the exact method.

◆ ReduceTypes

#include <opencv2/core.hpp>

Enumerator
REDUCE_SUM 
Python: cv.REDUCE_SUM

the output is the sum of all rows/columns of the matrix.

REDUCE_AVG 
Python: cv.REDUCE_AVG

the output is the mean vector of all rows/columns of the matrix.

REDUCE_MAX 
Python: cv.REDUCE_MAX

the output is the maximum (column/row-wise) of all rows/columns of the matrix.

REDUCE_MIN 
Python: cv.REDUCE_MIN

the output is the minimum (column/row-wise) of all rows/columns of the matrix.

Function Documentation

◆ operator*() [1/4]

template<typename T >
static Affine3<T> cv::operator* ( const Affine3< T > &  affine1,
const Affine3< T > &  affine2 
)
static

◆ operator*() [2/4]

template<typename T , typename V >
static V cv::operator* ( const Affine3< T > &  affine,
const V &  vector 
)
static

#include <opencv2/core/affine.hpp>

V is a 3-element vector with member fields x, y and z.

◆ operator*() [3/4]

static Vec3f cv::operator* ( const Affine3f affine,
const Vec3f vector 
)
static

◆ operator*() [4/4]

static Vec3d cv::operator* ( const Affine3d affine,
const Vec3d vector 
)
static

◆ swap() [1/2]

void cv::swap ( Mat a,
Mat b 
)

#include <opencv2/core.hpp>

Swaps two matrices.

Examples:
samples/cpp/lkdemo.cpp, and samples/cpp/warpPerspective_demo.cpp.

◆ swap() [2/2]

void cv::swap ( UMat a,
UMat b 
)

#include <opencv2/core.hpp>

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.