Fixed documentation: corrected parameter names
This commit is contained in:
@@ -60,20 +60,20 @@ namespace cv
|
||||
|
||||
//! various border interpolation methods
|
||||
enum { BORDER_REPLICATE=IPL_BORDER_REPLICATE, BORDER_CONSTANT=IPL_BORDER_CONSTANT,
|
||||
BORDER_REFLECT=IPL_BORDER_REFLECT, BORDER_WRAP=IPL_BORDER_WRAP,
|
||||
BORDER_REFLECT=IPL_BORDER_REFLECT, BORDER_WRAP=IPL_BORDER_WRAP,
|
||||
BORDER_REFLECT_101=IPL_BORDER_REFLECT_101, BORDER_REFLECT101=BORDER_REFLECT_101,
|
||||
BORDER_TRANSPARENT=IPL_BORDER_TRANSPARENT,
|
||||
BORDER_DEFAULT=BORDER_REFLECT_101, BORDER_ISOLATED=16 };
|
||||
|
||||
//! 1D interpolation function: returns coordinate of the "donor" pixel for the specified location p.
|
||||
//! 1D interpolation function: returns coordinate of the "donor" pixel for the specified location p.
|
||||
CV_EXPORTS_W int borderInterpolate( int p, int len, int borderType );
|
||||
|
||||
/*!
|
||||
The Base Class for 1D or Row-wise Filters
|
||||
|
||||
|
||||
This is the base class for linear or non-linear filters that process 1D data.
|
||||
In particular, such filters are used for the "horizontal" filtering parts in separable filters.
|
||||
|
||||
|
||||
Several functions in OpenCV return Ptr<BaseRowFilter> for the specific types of filters,
|
||||
and those pointers can be used directly or within cv::FilterEngine.
|
||||
*/
|
||||
@@ -93,17 +93,17 @@ public:
|
||||
|
||||
/*!
|
||||
The Base Class for Column-wise Filters
|
||||
|
||||
|
||||
This is the base class for linear or non-linear filters that process columns of 2D arrays.
|
||||
Such filters are used for the "vertical" filtering parts in separable filters.
|
||||
|
||||
|
||||
Several functions in OpenCV return Ptr<BaseColumnFilter> for the specific types of filters,
|
||||
and those pointers can be used directly or within cv::FilterEngine.
|
||||
|
||||
|
||||
Unlike cv::BaseRowFilter, cv::BaseColumnFilter may have some context information,
|
||||
i.e. box filter keeps the sliding sum of elements. To reset the state BaseColumnFilter::reset()
|
||||
must be called (e.g. the method is called by cv::FilterEngine)
|
||||
*/
|
||||
*/
|
||||
class CV_EXPORTS BaseColumnFilter
|
||||
{
|
||||
public:
|
||||
@@ -121,15 +121,15 @@ public:
|
||||
|
||||
/*!
|
||||
The Base Class for Non-Separable 2D Filters.
|
||||
|
||||
|
||||
This is the base class for linear or non-linear 2D filters.
|
||||
|
||||
|
||||
Several functions in OpenCV return Ptr<BaseFilter> for the specific types of filters,
|
||||
and those pointers can be used directly or within cv::FilterEngine.
|
||||
|
||||
|
||||
Similar to cv::BaseColumnFilter, the class may have some context information,
|
||||
that should be reset using BaseFilter::reset() method before processing the new array.
|
||||
*/
|
||||
*/
|
||||
class CV_EXPORTS BaseFilter
|
||||
{
|
||||
public:
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
|
||||
/*!
|
||||
The Main Class for Image Filtering.
|
||||
|
||||
|
||||
The class can be used to apply an arbitrary filtering operation to an image.
|
||||
It contains all the necessary intermediate buffers, it computes extrapolated values
|
||||
of the "virtual" pixels outside of the image etc.
|
||||
@@ -156,45 +156,45 @@ public:
|
||||
are returned by various OpenCV functions, such as cv::createSeparableLinearFilter(),
|
||||
cv::createLinearFilter(), cv::createGaussianFilter(), cv::createDerivFilter(),
|
||||
cv::createBoxFilter() and cv::createMorphologyFilter().
|
||||
|
||||
|
||||
Using the class you can process large images by parts and build complex pipelines
|
||||
that include filtering as some of the stages. If all you need is to apply some pre-defined
|
||||
filtering operation, you may use cv::filter2D(), cv::erode(), cv::dilate() etc.
|
||||
functions that create FilterEngine internally.
|
||||
|
||||
|
||||
Here is the example on how to use the class to implement Laplacian operator, which is the sum of
|
||||
second-order derivatives. More complex variant for different types is implemented in cv::Laplacian().
|
||||
|
||||
|
||||
\code
|
||||
void laplace_f(const Mat& src, Mat& dst)
|
||||
{
|
||||
CV_Assert( src.type() == CV_32F );
|
||||
// make sure the destination array has the proper size and type
|
||||
dst.create(src.size(), src.type());
|
||||
|
||||
|
||||
// get the derivative and smooth kernels for d2I/dx2.
|
||||
// for d2I/dy2 we could use the same kernels, just swapped
|
||||
Mat kd, ks;
|
||||
getSobelKernels( kd, ks, 2, 0, ksize, false, ktype );
|
||||
|
||||
|
||||
// let's process 10 source rows at once
|
||||
int DELTA = std::min(10, src.rows);
|
||||
Ptr<FilterEngine> Fxx = createSeparableLinearFilter(src.type(),
|
||||
dst.type(), kd, ks, Point(-1,-1), 0, borderType, borderType, Scalar() );
|
||||
dst.type(), kd, ks, Point(-1,-1), 0, borderType, borderType, Scalar() );
|
||||
Ptr<FilterEngine> Fyy = createSeparableLinearFilter(src.type(),
|
||||
dst.type(), ks, kd, Point(-1,-1), 0, borderType, borderType, Scalar() );
|
||||
|
||||
|
||||
int y = Fxx->start(src), dsty = 0, dy = 0;
|
||||
Fyy->start(src);
|
||||
const uchar* sptr = src.data + y*src.step;
|
||||
|
||||
|
||||
// allocate the buffers for the spatial image derivatives;
|
||||
// the buffers need to have more than DELTA rows, because at the
|
||||
// last iteration the output may take max(kd.rows-1,ks.rows-1)
|
||||
// rows more than the input.
|
||||
Mat Ixx( DELTA + kd.rows - 1, src.cols, dst.type() );
|
||||
Mat Iyy( DELTA + kd.rows - 1, src.cols, dst.type() );
|
||||
|
||||
|
||||
// inside the loop we always pass DELTA rows to the filter
|
||||
// (note that the "proceed" method takes care of possibe overflow, since
|
||||
// it was given the actual image height in the "start" method)
|
||||
@@ -241,7 +241,7 @@ public:
|
||||
int srcType, int dstType, int bufType,
|
||||
int _rowBorderType=BORDER_REPLICATE, int _columnBorderType=-1,
|
||||
const Scalar& _borderValue=Scalar());
|
||||
//! starts filtering of the specified ROI of an image of size wholeSize.
|
||||
//! starts filtering of the specified ROI of an image of size wholeSize.
|
||||
virtual int start(Size wholeSize, Rect roi, int maxBufRows=-1);
|
||||
//! starts filtering of the specified ROI of the specified image.
|
||||
virtual int start(const Mat& src, const Rect& srcRoi=Rect(0,0,-1,-1),
|
||||
@@ -256,10 +256,10 @@ public:
|
||||
bool isolated=false);
|
||||
//! returns true if the filter is separable
|
||||
bool isSeparable() const { return (const BaseFilter*)filter2D == 0; }
|
||||
//! returns the number
|
||||
//! returns the number
|
||||
int remainingInputRows() const;
|
||||
int remainingOutputRows() const;
|
||||
|
||||
|
||||
int srcType, dstType, bufType;
|
||||
Size ksize;
|
||||
Point anchor;
|
||||
@@ -276,7 +276,7 @@ public:
|
||||
vector<uchar> constBorderRow;
|
||||
int bufStep, startY, startY0, endY, rowCount, dstY;
|
||||
vector<uchar*> rows;
|
||||
|
||||
|
||||
Ptr<BaseFilter> filter2D;
|
||||
Ptr<BaseRowFilter> rowFilter;
|
||||
Ptr<BaseColumnFilter> columnFilter;
|
||||
@@ -309,16 +309,16 @@ CV_EXPORTS Ptr<BaseFilter> getLinearFilter(int srcType, int dstType,
|
||||
//! returns the separable linear filter engine
|
||||
CV_EXPORTS Ptr<FilterEngine> createSeparableLinearFilter(int srcType, int dstType,
|
||||
InputArray rowKernel, InputArray columnKernel,
|
||||
Point _anchor=Point(-1,-1), double delta=0,
|
||||
int _rowBorderType=BORDER_DEFAULT,
|
||||
int _columnBorderType=-1,
|
||||
const Scalar& _borderValue=Scalar());
|
||||
Point anchor=Point(-1,-1), double delta=0,
|
||||
int rowBorderType=BORDER_DEFAULT,
|
||||
int columnBorderType=-1,
|
||||
const Scalar& borderValue=Scalar());
|
||||
|
||||
//! returns the non-separable linear filter engine
|
||||
CV_EXPORTS Ptr<FilterEngine> createLinearFilter(int srcType, int dstType,
|
||||
InputArray kernel, Point _anchor=Point(-1,-1),
|
||||
double delta=0, int _rowBorderType=BORDER_DEFAULT,
|
||||
int _columnBorderType=-1, const Scalar& _borderValue=Scalar());
|
||||
double delta=0, int rowBorderType=BORDER_DEFAULT,
|
||||
int columnBorderType=-1, const Scalar& borderValue=Scalar());
|
||||
|
||||
//! returns the Gaussian kernel with the specified parameters
|
||||
CV_EXPORTS_W Mat getGaussianKernel( int ksize, double sigma, int ktype=CV_64F );
|
||||
@@ -335,7 +335,7 @@ CV_EXPORTS_W void getDerivKernels( OutputArray kx, OutputArray ky,
|
||||
CV_EXPORTS Ptr<FilterEngine> createDerivFilter( int srcType, int dstType,
|
||||
int dx, int dy, int ksize,
|
||||
int borderType=BORDER_DEFAULT );
|
||||
//! returns horizontal 1D box filter
|
||||
//! returns horizontal 1D box filter
|
||||
CV_EXPORTS Ptr<BaseRowFilter> getRowSumFilter(int srcType, int sumType,
|
||||
int ksize, int anchor=-1);
|
||||
//! returns vertical 1D box filter
|
||||
@@ -347,11 +347,11 @@ CV_EXPORTS Ptr<FilterEngine> createBoxFilter( int srcType, int dstType, Size ksi
|
||||
Point anchor=Point(-1,-1),
|
||||
bool normalize=true,
|
||||
int borderType=BORDER_DEFAULT);
|
||||
|
||||
|
||||
//! returns the Gabor kernel with the specified parameters
|
||||
CV_EXPORTS_W Mat getGaborKernel( Size ksize, double sigma, double theta, double lambd,
|
||||
double gamma, double psi=CV_PI*0.5, int ktype=CV_64F );
|
||||
|
||||
|
||||
//! type of morphological operation
|
||||
enum { MORPH_ERODE=CV_MOP_ERODE, MORPH_DILATE=CV_MOP_DILATE,
|
||||
MORPH_OPEN=CV_MOP_OPEN, MORPH_CLOSE=CV_MOP_CLOSE,
|
||||
@@ -365,15 +365,15 @@ CV_EXPORTS Ptr<BaseColumnFilter> getMorphologyColumnFilter(int op, int type, int
|
||||
//! returns 2D morphological filter
|
||||
CV_EXPORTS Ptr<BaseFilter> getMorphologyFilter(int op, int type, InputArray kernel,
|
||||
Point anchor=Point(-1,-1));
|
||||
|
||||
|
||||
//! returns "magic" border value for erosion and dilation. It is automatically transformed to Scalar::all(-DBL_MAX) for dilation.
|
||||
static inline Scalar morphologyDefaultBorderValue() { return Scalar::all(DBL_MAX); }
|
||||
|
||||
//! returns morphological filter engine. Only MORPH_ERODE and MORPH_DILATE are supported.
|
||||
CV_EXPORTS Ptr<FilterEngine> createMorphologyFilter(int op, int type, InputArray kernel,
|
||||
Point anchor=Point(-1,-1), int _rowBorderType=BORDER_CONSTANT,
|
||||
int _columnBorderType=-1,
|
||||
const Scalar& _borderValue=morphologyDefaultBorderValue());
|
||||
Point anchor=Point(-1,-1), int rowBorderType=BORDER_CONSTANT,
|
||||
int columnBorderType=-1,
|
||||
const Scalar& borderValue=morphologyDefaultBorderValue());
|
||||
|
||||
//! shape of the structuring element
|
||||
enum { MORPH_RECT=0, MORPH_CROSS=1, MORPH_ELLIPSE=2 };
|
||||
@@ -382,7 +382,7 @@ CV_EXPORTS_W Mat getStructuringElement(int shape, Size ksize, Point anchor=Point
|
||||
|
||||
template<> CV_EXPORTS void Ptr<IplConvKernel>::delete_obj();
|
||||
|
||||
//! copies 2D array to a larger destination array with extrapolation of the outer part of src using the specified border mode
|
||||
//! copies 2D array to a larger destination array with extrapolation of the outer part of src using the specified border mode
|
||||
CV_EXPORTS_W void copyMakeBorder( InputArray src, OutputArray dst,
|
||||
int top, int bottom, int left, int right,
|
||||
int borderType, const Scalar& value=Scalar() );
|
||||
@@ -418,7 +418,7 @@ CV_EXPORTS_W void sepFilter2D( InputArray src, OutputArray dst, int ddepth,
|
||||
InputArray kernelX, InputArray kernelY,
|
||||
Point anchor=Point(-1,-1),
|
||||
double delta=0, int borderType=BORDER_DEFAULT );
|
||||
|
||||
|
||||
//! applies generalized Sobel operator to the image
|
||||
CV_EXPORTS_W void Sobel( InputArray src, OutputArray dst, int ddepth,
|
||||
int dx, int dy, int ksize=3,
|
||||
@@ -452,7 +452,7 @@ CV_EXPORTS_W void cornerHarris( InputArray src, OutputArray dst, int blockSize,
|
||||
|
||||
// low-level function for computing eigenvalues and eigenvectors of 2x2 matrices
|
||||
CV_EXPORTS void eigen2x2( const float* a, float* e, int n );
|
||||
|
||||
|
||||
//! computes both eigenvalues and the eigenvectors of 2x2 derivative covariation matrix at each pixel. The output is stored as 6-channel matrix.
|
||||
CV_EXPORTS_W void cornerEigenValsAndVecs( InputArray src, OutputArray dst,
|
||||
int blockSize, int ksize,
|
||||
@@ -483,7 +483,7 @@ CV_EXPORTS_W void HoughLinesP( InputArray image, OutputArray lines,
|
||||
double rho, double theta, int threshold,
|
||||
double minLineLength=0, double maxLineGap=0 );
|
||||
|
||||
//! finds circles in the grayscale image using 2+1 gradient Hough transform
|
||||
//! finds circles in the grayscale image using 2+1 gradient Hough transform
|
||||
CV_EXPORTS_W void HoughCircles( InputArray image, OutputArray circles,
|
||||
int method, double dp, double minDist,
|
||||
double param1=100, double param2=100,
|
||||
@@ -494,13 +494,13 @@ CV_EXPORTS_W void erode( InputArray src, OutputArray dst, InputArray kernel,
|
||||
Point anchor=Point(-1,-1), int iterations=1,
|
||||
int borderType=BORDER_CONSTANT,
|
||||
const Scalar& borderValue=morphologyDefaultBorderValue() );
|
||||
|
||||
|
||||
//! dilates the image (applies the local maximum operator)
|
||||
CV_EXPORTS_W void dilate( InputArray src, OutputArray dst, InputArray kernel,
|
||||
Point anchor=Point(-1,-1), int iterations=1,
|
||||
int borderType=BORDER_CONSTANT,
|
||||
const Scalar& borderValue=morphologyDefaultBorderValue() );
|
||||
|
||||
|
||||
//! applies an advanced morphological operation to the image
|
||||
CV_EXPORTS_W void morphologyEx( InputArray src, OutputArray dst,
|
||||
int op, InputArray kernel,
|
||||
@@ -531,7 +531,7 @@ CV_EXPORTS_W void warpAffine( InputArray src, OutputArray dst,
|
||||
int flags=INTER_LINEAR,
|
||||
int borderMode=BORDER_CONSTANT,
|
||||
const Scalar& borderValue=Scalar());
|
||||
|
||||
|
||||
//! warps the image using perspective transformation
|
||||
CV_EXPORTS_W void warpPerspective( InputArray src, OutputArray dst,
|
||||
InputArray M, Size dsize,
|
||||
@@ -556,7 +556,7 @@ CV_EXPORTS_W void remap( InputArray src, OutputArray dst,
|
||||
CV_EXPORTS_W void convertMaps( InputArray map1, InputArray map2,
|
||||
OutputArray dstmap1, OutputArray dstmap2,
|
||||
int dstmap1type, bool nninterpolation=false );
|
||||
|
||||
|
||||
//! returns 2x3 affine transformation matrix for the planar rotation.
|
||||
CV_EXPORTS_W Mat getRotationMatrix2D( Point2f center, double angle, double scale );
|
||||
//! returns 3x3 perspective transformation for the corresponding 4 point pairs.
|
||||
@@ -597,12 +597,12 @@ CV_EXPORTS_W void accumulateProduct( InputArray src1, InputArray src2,
|
||||
CV_EXPORTS_W void accumulateWeighted( InputArray src, InputOutputArray dst,
|
||||
double alpha, InputArray mask=noArray() );
|
||||
|
||||
//! computes PSNR image/video quality metric
|
||||
//! computes PSNR image/video quality metric
|
||||
CV_EXPORTS_W double PSNR(InputArray src1, InputArray src2);
|
||||
|
||||
|
||||
CV_EXPORTS_W Point2d phaseCorrelate(InputArray src1, InputArray src2, InputArray window = noArray());
|
||||
CV_EXPORTS_W void createHanningWindow(OutputArray dst, Size winSize, int type);
|
||||
|
||||
|
||||
//! type of the threshold operation
|
||||
enum { THRESH_BINARY=CV_THRESH_BINARY, THRESH_BINARY_INV=CV_THRESH_BINARY_INV,
|
||||
THRESH_TRUNC=CV_THRESH_TRUNC, THRESH_TOZERO=CV_THRESH_TOZERO,
|
||||
@@ -637,7 +637,7 @@ CV_EXPORTS_W void undistort( InputArray src, OutputArray dst,
|
||||
InputArray cameraMatrix,
|
||||
InputArray distCoeffs,
|
||||
InputArray newCameraMatrix=noArray() );
|
||||
|
||||
|
||||
//! initializes maps for cv::remap() to correct lens distortion and optionally rectify the image
|
||||
CV_EXPORTS_W void initUndistortRectifyMap( InputArray cameraMatrix, InputArray distCoeffs,
|
||||
InputArray R, InputArray newCameraMatrix,
|
||||
@@ -647,25 +647,25 @@ enum
|
||||
{
|
||||
PROJ_SPHERICAL_ORTHO = 0,
|
||||
PROJ_SPHERICAL_EQRECT = 1
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
//! initializes maps for cv::remap() for wide-angle
|
||||
CV_EXPORTS_W float initWideAngleProjMap( InputArray cameraMatrix, InputArray distCoeffs,
|
||||
Size imageSize, int destImageWidth,
|
||||
int m1type, OutputArray map1, OutputArray map2,
|
||||
int projType=PROJ_SPHERICAL_EQRECT, double alpha=0);
|
||||
|
||||
|
||||
//! returns the default new camera matrix (by default it is the same as cameraMatrix unless centerPricipalPoint=true)
|
||||
CV_EXPORTS_W Mat getDefaultNewCameraMatrix( InputArray cameraMatrix, Size imgsize=Size(),
|
||||
bool centerPrincipalPoint=false );
|
||||
|
||||
|
||||
//! returns points' coordinates after lens distortion correction
|
||||
CV_EXPORTS_W void undistortPoints( InputArray src, OutputArray dst,
|
||||
InputArray cameraMatrix, InputArray distCoeffs,
|
||||
InputArray R=noArray(), InputArray P=noArray());
|
||||
|
||||
template<> CV_EXPORTS void Ptr<CvHistogram>::delete_obj();
|
||||
|
||||
|
||||
//! computes the joint dense histogram for a set of images.
|
||||
CV_EXPORTS void calcHist( const Mat* images, int nimages,
|
||||
const int* channels, InputArray mask,
|
||||
@@ -678,7 +678,7 @@ CV_EXPORTS void calcHist( const Mat* images, int nimages,
|
||||
SparseMat& hist, int dims,
|
||||
const int* histSize, const float** ranges,
|
||||
bool uniform=true, bool accumulate=false );
|
||||
|
||||
|
||||
CV_EXPORTS_W void calcHist( InputArrayOfArrays images,
|
||||
const vector<int>& channels,
|
||||
InputArray mask, OutputArray hist,
|
||||
@@ -694,7 +694,7 @@ CV_EXPORTS void calcBackProject( const Mat* images, int nimages,
|
||||
|
||||
//! computes back projection for the set of images
|
||||
CV_EXPORTS void calcBackProject( const Mat* images, int nimages,
|
||||
const int* channels, const SparseMat& hist,
|
||||
const int* channels, const SparseMat& hist,
|
||||
OutputArray backProject, const float** ranges,
|
||||
double scale=1, bool uniform=true );
|
||||
|
||||
@@ -705,8 +705,8 @@ CV_EXPORTS_W void calcBackProject( InputArrayOfArrays images, const vector<int>&
|
||||
|
||||
/*CV_EXPORTS void calcBackProjectPatch( const Mat* images, int nimages, const int* channels,
|
||||
InputArray hist, OutputArray dst, Size patchSize,
|
||||
int method, double factor=1 );
|
||||
|
||||
int method, double factor=1 );
|
||||
|
||||
CV_EXPORTS_W void calcBackProjectPatch( InputArrayOfArrays images, const vector<int>& channels,
|
||||
InputArray hist, OutputArray dst, Size patchSize,
|
||||
int method, double factor=1 );*/
|
||||
@@ -719,7 +719,7 @@ CV_EXPORTS double compareHist( const SparseMat& H1, const SparseMat& H2, int met
|
||||
|
||||
//! normalizes the grayscale image brightness and contrast by normalizing its histogram
|
||||
CV_EXPORTS_W void equalizeHist( InputArray src, OutputArray dst );
|
||||
|
||||
|
||||
CV_EXPORTS float EMD( InputArray signature1, InputArray signature2,
|
||||
int distType, InputArray cost=noArray(),
|
||||
float* lowerBound=0, OutputArray flow=noArray() );
|
||||
@@ -739,7 +739,7 @@ enum
|
||||
GC_BGD = 0, //!< background
|
||||
GC_FGD = 1, //!< foreground
|
||||
GC_PR_BGD = 2, //!< most probably background
|
||||
GC_PR_FGD = 3 //!< most probably foreground
|
||||
GC_PR_FGD = 3 //!< most probably foreground
|
||||
};
|
||||
|
||||
//! GrabCut algorithm flags
|
||||
@@ -751,7 +751,7 @@ enum
|
||||
};
|
||||
|
||||
//! segments the image using GrabCut algorithm
|
||||
CV_EXPORTS_W void grabCut( InputArray img, InputOutputArray mask, Rect rect,
|
||||
CV_EXPORTS_W void grabCut( InputArray img, InputOutputArray mask, Rect rect,
|
||||
InputOutputArray bgdModel, InputOutputArray fgdModel,
|
||||
int iterCount, int mode = GC_EVAL );
|
||||
|
||||
@@ -760,7 +760,7 @@ enum
|
||||
DIST_LABEL_CCOMP = 0,
|
||||
DIST_LABEL_PIXEL = 1
|
||||
};
|
||||
|
||||
|
||||
//! builds the discrete Voronoi diagram
|
||||
CV_EXPORTS_AS(distanceTransformWithLabels) void distanceTransform( InputArray src, OutputArray dst,
|
||||
OutputArray labels, int distanceType, int maskSize,
|
||||
@@ -784,27 +784,27 @@ CV_EXPORTS_W int floodFill( InputOutputArray image, InputOutputArray mask,
|
||||
Scalar loDiff=Scalar(), Scalar upDiff=Scalar(),
|
||||
int flags=4 );
|
||||
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
COLOR_BGR2BGRA =0,
|
||||
COLOR_RGB2RGBA =COLOR_BGR2BGRA,
|
||||
|
||||
|
||||
COLOR_BGRA2BGR =1,
|
||||
COLOR_RGBA2RGB =COLOR_BGRA2BGR,
|
||||
|
||||
|
||||
COLOR_BGR2RGBA =2,
|
||||
COLOR_RGB2BGRA =COLOR_BGR2RGBA,
|
||||
|
||||
|
||||
COLOR_RGBA2BGR =3,
|
||||
COLOR_BGRA2RGB =COLOR_RGBA2BGR,
|
||||
|
||||
|
||||
COLOR_BGR2RGB =4,
|
||||
COLOR_RGB2BGR =COLOR_BGR2RGB,
|
||||
|
||||
|
||||
COLOR_BGRA2RGBA =5,
|
||||
COLOR_RGBA2BGRA =COLOR_BGRA2RGBA,
|
||||
|
||||
|
||||
COLOR_BGR2GRAY =6,
|
||||
COLOR_RGB2GRAY =7,
|
||||
COLOR_GRAY2BGR =8,
|
||||
@@ -813,7 +813,7 @@ enum
|
||||
COLOR_GRAY2RGBA =COLOR_GRAY2BGRA,
|
||||
COLOR_BGRA2GRAY =10,
|
||||
COLOR_RGBA2GRAY =11,
|
||||
|
||||
|
||||
COLOR_BGR2BGR565 =12,
|
||||
COLOR_RGB2BGR565 =13,
|
||||
COLOR_BGR5652BGR =14,
|
||||
@@ -822,10 +822,10 @@ enum
|
||||
COLOR_RGBA2BGR565 =17,
|
||||
COLOR_BGR5652BGRA =18,
|
||||
COLOR_BGR5652RGBA =19,
|
||||
|
||||
|
||||
COLOR_GRAY2BGR565 =20,
|
||||
COLOR_BGR5652GRAY =21,
|
||||
|
||||
|
||||
COLOR_BGR2BGR555 =22,
|
||||
COLOR_RGB2BGR555 =23,
|
||||
COLOR_BGR5552BGR =24,
|
||||
@@ -834,86 +834,86 @@ enum
|
||||
COLOR_RGBA2BGR555 =27,
|
||||
COLOR_BGR5552BGRA =28,
|
||||
COLOR_BGR5552RGBA =29,
|
||||
|
||||
|
||||
COLOR_GRAY2BGR555 =30,
|
||||
COLOR_BGR5552GRAY =31,
|
||||
|
||||
|
||||
COLOR_BGR2XYZ =32,
|
||||
COLOR_RGB2XYZ =33,
|
||||
COLOR_XYZ2BGR =34,
|
||||
COLOR_XYZ2RGB =35,
|
||||
|
||||
|
||||
COLOR_BGR2YCrCb =36,
|
||||
COLOR_RGB2YCrCb =37,
|
||||
COLOR_YCrCb2BGR =38,
|
||||
COLOR_YCrCb2RGB =39,
|
||||
|
||||
|
||||
COLOR_BGR2HSV =40,
|
||||
COLOR_RGB2HSV =41,
|
||||
|
||||
|
||||
COLOR_BGR2Lab =44,
|
||||
COLOR_RGB2Lab =45,
|
||||
|
||||
|
||||
COLOR_BayerBG2BGR =46,
|
||||
COLOR_BayerGB2BGR =47,
|
||||
COLOR_BayerRG2BGR =48,
|
||||
COLOR_BayerGR2BGR =49,
|
||||
|
||||
|
||||
COLOR_BayerBG2RGB =COLOR_BayerRG2BGR,
|
||||
COLOR_BayerGB2RGB =COLOR_BayerGR2BGR,
|
||||
COLOR_BayerRG2RGB =COLOR_BayerBG2BGR,
|
||||
COLOR_BayerGR2RGB =COLOR_BayerGB2BGR,
|
||||
|
||||
|
||||
COLOR_BGR2Luv =50,
|
||||
COLOR_RGB2Luv =51,
|
||||
COLOR_BGR2HLS =52,
|
||||
COLOR_RGB2HLS =53,
|
||||
|
||||
|
||||
COLOR_HSV2BGR =54,
|
||||
COLOR_HSV2RGB =55,
|
||||
|
||||
|
||||
COLOR_Lab2BGR =56,
|
||||
COLOR_Lab2RGB =57,
|
||||
COLOR_Luv2BGR =58,
|
||||
COLOR_Luv2RGB =59,
|
||||
COLOR_HLS2BGR =60,
|
||||
COLOR_HLS2RGB =61,
|
||||
|
||||
|
||||
COLOR_BayerBG2BGR_VNG =62,
|
||||
COLOR_BayerGB2BGR_VNG =63,
|
||||
COLOR_BayerRG2BGR_VNG =64,
|
||||
COLOR_BayerGR2BGR_VNG =65,
|
||||
|
||||
|
||||
COLOR_BayerBG2RGB_VNG =COLOR_BayerRG2BGR_VNG,
|
||||
COLOR_BayerGB2RGB_VNG =COLOR_BayerGR2BGR_VNG,
|
||||
COLOR_BayerRG2RGB_VNG =COLOR_BayerBG2BGR_VNG,
|
||||
COLOR_BayerGR2RGB_VNG =COLOR_BayerGB2BGR_VNG,
|
||||
|
||||
|
||||
COLOR_BGR2HSV_FULL = 66,
|
||||
COLOR_RGB2HSV_FULL = 67,
|
||||
COLOR_BGR2HLS_FULL = 68,
|
||||
COLOR_RGB2HLS_FULL = 69,
|
||||
|
||||
|
||||
COLOR_HSV2BGR_FULL = 70,
|
||||
COLOR_HSV2RGB_FULL = 71,
|
||||
COLOR_HLS2BGR_FULL = 72,
|
||||
COLOR_HLS2RGB_FULL = 73,
|
||||
|
||||
|
||||
COLOR_LBGR2Lab = 74,
|
||||
COLOR_LRGB2Lab = 75,
|
||||
COLOR_LBGR2Luv = 76,
|
||||
COLOR_LRGB2Luv = 77,
|
||||
|
||||
|
||||
COLOR_Lab2LBGR = 78,
|
||||
COLOR_Lab2LRGB = 79,
|
||||
COLOR_Luv2LBGR = 80,
|
||||
COLOR_Luv2LRGB = 81,
|
||||
|
||||
|
||||
COLOR_BGR2YUV = 82,
|
||||
COLOR_RGB2YUV = 83,
|
||||
COLOR_YUV2BGR = 84,
|
||||
COLOR_YUV2RGB = 85,
|
||||
|
||||
|
||||
COLOR_BayerBG2GRAY = 86,
|
||||
COLOR_BayerGB2GRAY = 87,
|
||||
COLOR_BayerRG2GRAY = 88,
|
||||
@@ -921,7 +921,7 @@ enum
|
||||
|
||||
//YUV 4:2:0 formats family
|
||||
COLOR_YUV2RGB_NV12 = 90,
|
||||
COLOR_YUV2BGR_NV12 = 91,
|
||||
COLOR_YUV2BGR_NV12 = 91,
|
||||
COLOR_YUV2RGB_NV21 = 92,
|
||||
COLOR_YUV2BGR_NV21 = 93,
|
||||
COLOR_YUV420sp2RGB = COLOR_YUV2RGB_NV21,
|
||||
@@ -933,7 +933,7 @@ enum
|
||||
COLOR_YUV2BGRA_NV21 = 97,
|
||||
COLOR_YUV420sp2RGBA = COLOR_YUV2RGBA_NV21,
|
||||
COLOR_YUV420sp2BGRA = COLOR_YUV2BGRA_NV21,
|
||||
|
||||
|
||||
COLOR_YUV2RGB_YV12 = 98,
|
||||
COLOR_YUV2BGR_YV12 = 99,
|
||||
COLOR_YUV2RGB_IYUV = 100,
|
||||
@@ -942,7 +942,7 @@ enum
|
||||
COLOR_YUV2BGR_I420 = COLOR_YUV2BGR_IYUV,
|
||||
COLOR_YUV420p2RGB = COLOR_YUV2RGB_YV12,
|
||||
COLOR_YUV420p2BGR = COLOR_YUV2BGR_YV12,
|
||||
|
||||
|
||||
COLOR_YUV2RGBA_YV12 = 102,
|
||||
COLOR_YUV2BGRA_YV12 = 103,
|
||||
COLOR_YUV2RGBA_IYUV = 104,
|
||||
@@ -951,7 +951,7 @@ enum
|
||||
COLOR_YUV2BGRA_I420 = COLOR_YUV2BGRA_IYUV,
|
||||
COLOR_YUV420p2RGBA = COLOR_YUV2RGBA_YV12,
|
||||
COLOR_YUV420p2BGRA = COLOR_YUV2BGRA_YV12,
|
||||
|
||||
|
||||
COLOR_YUV2GRAY_420 = 106,
|
||||
COLOR_YUV2GRAY_NV21 = COLOR_YUV2GRAY_420,
|
||||
COLOR_YUV2GRAY_NV12 = COLOR_YUV2GRAY_420,
|
||||
@@ -960,7 +960,7 @@ enum
|
||||
COLOR_YUV2GRAY_I420 = COLOR_YUV2GRAY_420,
|
||||
COLOR_YUV420sp2GRAY = COLOR_YUV2GRAY_420,
|
||||
COLOR_YUV420p2GRAY = COLOR_YUV2GRAY_420,
|
||||
|
||||
|
||||
//YUV 4:2:2 formats family
|
||||
COLOR_YUV2RGB_UYVY = 107,
|
||||
COLOR_YUV2BGR_UYVY = 108,
|
||||
@@ -970,7 +970,7 @@ enum
|
||||
COLOR_YUV2BGR_Y422 = COLOR_YUV2BGR_UYVY,
|
||||
COLOR_YUV2RGB_UYNV = COLOR_YUV2RGB_UYVY,
|
||||
COLOR_YUV2BGR_UYNV = COLOR_YUV2BGR_UYVY,
|
||||
|
||||
|
||||
COLOR_YUV2RGBA_UYVY = 111,
|
||||
COLOR_YUV2BGRA_UYVY = 112,
|
||||
//COLOR_YUV2RGBA_VYUY = 113,
|
||||
@@ -979,7 +979,7 @@ enum
|
||||
COLOR_YUV2BGRA_Y422 = COLOR_YUV2BGRA_UYVY,
|
||||
COLOR_YUV2RGBA_UYNV = COLOR_YUV2RGBA_UYVY,
|
||||
COLOR_YUV2BGRA_UYNV = COLOR_YUV2BGRA_UYVY,
|
||||
|
||||
|
||||
COLOR_YUV2RGB_YUY2 = 115,
|
||||
COLOR_YUV2BGR_YUY2 = 116,
|
||||
COLOR_YUV2RGB_YVYU = 117,
|
||||
@@ -988,7 +988,7 @@ enum
|
||||
COLOR_YUV2BGR_YUYV = COLOR_YUV2BGR_YUY2,
|
||||
COLOR_YUV2RGB_YUNV = COLOR_YUV2RGB_YUY2,
|
||||
COLOR_YUV2BGR_YUNV = COLOR_YUV2BGR_YUY2,
|
||||
|
||||
|
||||
COLOR_YUV2RGBA_YUY2 = 119,
|
||||
COLOR_YUV2BGRA_YUY2 = 120,
|
||||
COLOR_YUV2RGBA_YVYU = 121,
|
||||
@@ -997,7 +997,7 @@ enum
|
||||
COLOR_YUV2BGRA_YUYV = COLOR_YUV2BGRA_YUY2,
|
||||
COLOR_YUV2RGBA_YUNV = COLOR_YUV2RGBA_YUY2,
|
||||
COLOR_YUV2BGRA_YUNV = COLOR_YUV2BGRA_YUY2,
|
||||
|
||||
|
||||
COLOR_YUV2GRAY_UYVY = 123,
|
||||
COLOR_YUV2GRAY_YUY2 = 124,
|
||||
//COLOR_YUV2GRAY_VYUY = COLOR_YUV2GRAY_UYVY,
|
||||
@@ -1006,11 +1006,11 @@ enum
|
||||
COLOR_YUV2GRAY_YVYU = COLOR_YUV2GRAY_YUY2,
|
||||
COLOR_YUV2GRAY_YUYV = COLOR_YUV2GRAY_YUY2,
|
||||
COLOR_YUV2GRAY_YUNV = COLOR_YUV2GRAY_YUY2,
|
||||
|
||||
|
||||
COLOR_COLORCVT_MAX = 125
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
//! converts image from one color space to another
|
||||
CV_EXPORTS_W void cvtColor( InputArray src, OutputArray dst, int code, int dstCn=0 );
|
||||
|
||||
@@ -1027,7 +1027,7 @@ public:
|
||||
Moments( const CvMoments& moments );
|
||||
//! the conversion to CvMoments
|
||||
operator CvMoments() const;
|
||||
|
||||
|
||||
//! spatial moments
|
||||
CV_PROP_RW double m00, m10, m01, m20, m11, m02, m30, m21, m12, m03;
|
||||
//! central moments
|
||||
@@ -1093,7 +1093,7 @@ CV_EXPORTS_W double contourArea( InputArray contour, bool oriented=false );
|
||||
CV_EXPORTS_W RotatedRect minAreaRect( InputArray points );
|
||||
//! computes the minimal enclosing circle for a set of points
|
||||
CV_EXPORTS_W void minEnclosingCircle( InputArray points,
|
||||
CV_OUT Point2f& center, CV_OUT float& radius );
|
||||
CV_OUT Point2f& center, CV_OUT float& radius );
|
||||
//! matches two contours using one of the available algorithms
|
||||
CV_EXPORTS_W double matchShapes( InputArray contour1, InputArray contour2,
|
||||
int method, double parameter );
|
||||
@@ -1118,7 +1118,7 @@ CV_EXPORTS_W void fitLine( InputArray points, OutputArray line, int distType,
|
||||
double param, double reps, double aeps );
|
||||
//! checks if the point is inside the contour. Optionally computes the signed distance from the point to the contour boundary
|
||||
CV_EXPORTS_W double pointPolygonTest( InputArray contour, Point2f pt, bool measureDist );
|
||||
|
||||
|
||||
|
||||
class CV_EXPORTS_W Subdiv2D
|
||||
{
|
||||
@@ -1131,7 +1131,7 @@ public:
|
||||
PTLOC_VERTEX = 1,
|
||||
PTLOC_ON_EDGE = 2
|
||||
};
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
NEXT_AROUND_ORG = 0x00,
|
||||
@@ -1143,30 +1143,30 @@ public:
|
||||
PREV_AROUND_LEFT = 0x20,
|
||||
PREV_AROUND_RIGHT = 0x02
|
||||
};
|
||||
|
||||
|
||||
CV_WRAP Subdiv2D();
|
||||
CV_WRAP Subdiv2D(Rect rect);
|
||||
CV_WRAP void initDelaunay(Rect rect);
|
||||
|
||||
|
||||
CV_WRAP int insert(Point2f pt);
|
||||
CV_WRAP void insert(const vector<Point2f>& ptvec);
|
||||
CV_WRAP int locate(Point2f pt, CV_OUT int& edge, CV_OUT int& vertex);
|
||||
|
||||
|
||||
CV_WRAP int findNearest(Point2f pt, CV_OUT Point2f* nearestPt=0);
|
||||
CV_WRAP void getEdgeList(CV_OUT vector<Vec4f>& edgeList) const;
|
||||
CV_WRAP void getTriangleList(CV_OUT vector<Vec6f>& triangleList) const;
|
||||
CV_WRAP void getVoronoiFacetList(const vector<int>& idx, CV_OUT vector<vector<Point2f> >& facetList,
|
||||
CV_OUT vector<Point2f>& facetCenters);
|
||||
|
||||
|
||||
CV_WRAP Point2f getVertex(int vertex, CV_OUT int* firstEdge=0) const;
|
||||
|
||||
|
||||
CV_WRAP int getEdge( int edge, int nextEdgeType ) const;
|
||||
CV_WRAP int nextEdge(int edge) const;
|
||||
CV_WRAP int rotateEdge(int edge, int rotate) const;
|
||||
CV_WRAP int symEdge(int edge) const;
|
||||
CV_WRAP int edgeOrg(int edge, CV_OUT Point2f* orgpt=0) const;
|
||||
CV_WRAP int edgeDst(int edge, CV_OUT Point2f* dstpt=0) const;
|
||||
|
||||
|
||||
protected:
|
||||
int newEdge();
|
||||
void deleteEdge(int edge);
|
||||
@@ -1180,7 +1180,7 @@ protected:
|
||||
void calcVoronoi();
|
||||
void clearVoronoi();
|
||||
void checkSubdiv() const;
|
||||
|
||||
|
||||
struct CV_EXPORTS Vertex
|
||||
{
|
||||
Vertex();
|
||||
@@ -1199,13 +1199,13 @@ protected:
|
||||
int next[4];
|
||||
int pt[4];
|
||||
};
|
||||
|
||||
|
||||
vector<Vertex> vtx;
|
||||
vector<QuadEdge> qedges;
|
||||
int freeQEdge;
|
||||
int freePoint;
|
||||
bool validGeometry;
|
||||
|
||||
|
||||
int recentEdge;
|
||||
Point2f topLeft;
|
||||
Point2f bottomRight;
|
||||
|
@@ -351,8 +351,8 @@ CVAPI(CvPoint) cvReadChainPoint( CvChainPtReader* reader );
|
||||
a tree of polygonal curves (contours) */
|
||||
CVAPI(CvSeq*) cvApproxPoly( const void* src_seq,
|
||||
int header_size, CvMemStorage* storage,
|
||||
int method, double parameter,
|
||||
int parameter2 CV_DEFAULT(0));
|
||||
int method, double eps,
|
||||
int recursive CV_DEFAULT(0));
|
||||
|
||||
/* Calculates perimeter of a contour or length of a part of contour */
|
||||
CVAPI(double) cvArcLength( const void* curve,
|
||||
|
Reference in New Issue
Block a user