mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge branch 4.x
This commit is contained in:
@@ -1541,12 +1541,14 @@ respectively (see #getGaussianKernel for details); to fully control the result r
|
||||
possible future modifications of all this semantics, it is recommended to specify all of ksize,
|
||||
sigmaX, and sigmaY.
|
||||
@param borderType pixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
|
||||
@param hint Implementation modfication flags. See #AlgorithmHint
|
||||
|
||||
@sa sepFilter2D, filter2D, blur, boxFilter, bilateralFilter, medianBlur
|
||||
*/
|
||||
CV_EXPORTS_W void GaussianBlur( InputArray src, OutputArray dst, Size ksize,
|
||||
double sigmaX, double sigmaY = 0,
|
||||
int borderType = BORDER_DEFAULT );
|
||||
int borderType = BORDER_DEFAULT,
|
||||
AlgorithmHint hint = cv::ALGO_HINT_DEFAULT );
|
||||
|
||||
/** @brief Applies the bilateral filter to an image.
|
||||
|
||||
@@ -4084,6 +4086,28 @@ CV_EXPORTS_W void approxPolyDP( InputArray curve,
|
||||
OutputArray approxCurve,
|
||||
double epsilon, bool closed );
|
||||
|
||||
/** @brief Approximates a polygon with a convex hull with a specified accuracy and number of sides.
|
||||
|
||||
The cv::approxPolyN function approximates a polygon with a convex hull
|
||||
so that the difference between the contour area of the original contour and the new polygon is minimal.
|
||||
It uses a greedy algorithm for contracting two vertices into one in such a way that the additional area is minimal.
|
||||
Straight lines formed by each edge of the convex contour are drawn and the areas of the resulting triangles are considered.
|
||||
Each vertex will lie either on the original contour or outside it.
|
||||
|
||||
The algorithm based on the paper @cite LowIlie2003 .
|
||||
|
||||
@param curve Input vector of a 2D points stored in std::vector or Mat, points must be float or integer.
|
||||
@param approxCurve Result of the approximation. The type is vector of a 2D point (Point2f or Point) in std::vector or Mat.
|
||||
@param nsides The parameter defines the number of sides of the result polygon.
|
||||
@param epsilon_percentage defines the percentage of the maximum of additional area.
|
||||
If it equals -1, it is not used. Otherwise algorighm stops if additional area is greater than contourArea(_curve) * percentage.
|
||||
If additional area exceeds the limit, algorithm returns as many vertices as there were at the moment the limit was exceeded.
|
||||
@param ensure_convex If it is true, algorithm creates a convex hull of input contour. Otherwise input vector should be convex.
|
||||
*/
|
||||
CV_EXPORTS_W void approxPolyN(InputArray curve, OutputArray approxCurve,
|
||||
int nsides, float epsilon_percentage = -1.0,
|
||||
bool ensure_convex = true);
|
||||
|
||||
/** @brief Calculates a contour perimeter or a curve length.
|
||||
|
||||
The function computes a curve length or a closed contour perimeter.
|
||||
|
||||
Reference in New Issue
Block a user