Maximally (or Most??) stable extremal region extractor ::
Maximally stable extremal region extractor ::
class MSER : public CvMSERParams
{
...
...
@@ -85,7 +85,7 @@ Class implementing the Star keypoint detector ::
};
The class implements a modified version of the CenSurE keypoint detector described in
Agrawal08??.
[Agrawal08].
.. index:: SIFT
...
...
@@ -210,10 +210,10 @@ Class for extracting Speeded Up Robust Features from an image ::
bool useProvidedKeypoints=false) const;
};
The class implements the Speeded Up Robust Features descriptor Bay06.
The class implements the Speeded Up Robust Features descriptor [Bay06].
There is a fast multi-scale Hessian keypoint detector that can be used to find keypoints
(which is the default option). But the descriptors can be also computed for the user-specified keypoints.
The function?? can be used for object tracking and localization, image stitching, and so on. See the ``find_obj.cpp`` demo in OpenCV samples directory.
The algorithm can be used for object tracking and localization, image stitching, and so on. See the ``find_obj.cpp`` demo in OpenCV samples directory.
.. index:: RandomizedTree
...
...
@@ -301,13 +301,19 @@ RandomizedTree::train
.. c:function:: void train(std::vector<BaseKeypoint> const& base_set, RNG& rng, PatchGenerator& make_patch, int depth, int views, size_t reduced_num_dim, int num_quant_bits)
{Vector of ``BaseKeypoint`` type. Contains keypoints from the image that are used for training}??
{Random numbers generator is used for training}??
{Patch generator is used for training}??
{Maximum tree depth}??
:param base_set: Vector of ``BaseKeypoint`` type. Contains keypoints from the image that are used for training
{Number of dimensions are used in compressed signature}??
{Number of bits are used for quantization}??
:param rng: Random numbers generator is used for training
:param make_patch: Patch generator is used for training
:param depth: Maximum tree depth
:param views: The number of random views of each keypoint neighborhood to generate
:param reduced_num_dim: Number of dimensions are used in compressed signature
:param num_quant_bits: Number of bits are used for quantization
.. index:: RandomizedTree::read
...
...
@@ -315,15 +321,15 @@ RandomizedTree::read
------------------------
.. c:function:: read(const char* file_name, int num_quant_bits)
Reads a pre-saved randomized tree from a file or stream. ?? is it applied to the 1st func only?
.. c:function:: read(std::istream &is, int num_quant_bits)
.. c:function:: read(std::istream \&is, int num_quant_bits)
Read a pre-saved randomized tree from a file or stream.
:param file_name: Name of the file that contains randomized tree data.
:param is: Input stream associated with the file that contains randomized tree data.
{Number of bits are used for quantization}??
:param num_quant_bits: Number of bits are used for quantization
Applies quantization to the current randomized tree.
{Number of bits are used for quantization}??
:param num_quant_bits: Number of bits are used for quantization
The example below demonstrates the usage of ``RTreeClassifier`` for feature matching. There are test and train images and features are extracted from both with SURF. Output is
* **CV_WINDOW_FULLSCREEN** Change the window to fullscreen.
* **CV_WINDOW_FREERATIO** Make the image extendable (no ratio constraint).??
* **CV_WINDOW_FREERATIO** Make the window resizable without any ratio constraints.
* **CV_WINDOW_KEEPRATIO** Maintain the image ratio.??
* **CV_WINDOW_KEEPRATIO** Make the window resizable, but preserve the proportions of the displayed image.
The function ``setWindowProperty`` enables changing properties of a window.
...
...
@@ -200,19 +200,17 @@ displayOverlay
:param text: Overlay text to write on a window image.
:param delay: Duration (in milliseconds)? to display the overlay text. If this function is called before the previous overlay text timed out, the timer is restarted and the text is updated. If this value is zero, the text never disappears.
:param delay: The period (in milliseconds), during which the overlay text is displayed. If this function is called before the previous overlay text timed out, the timer is restarted and the text is updated. If this value is zero, the text never disappears.
The function ``displayOverlay`` displays useful information/tips on top of the window for a certain amount of time
*delay*
. This does not affect the image data.??
The function ``displayOverlay`` displays useful information/tips on top of the window for a certain amount of time *delay*. The function does not modify the image, displayed in the window, that is, after the specified delay the original content of the window is restored.
Creates a callback function called to draw OpenGL on top the the image display by ``windowname``.
Creates a callback function called to draw OpenGL on top the the image display by ``windowname``.
:param window_name: Name of the window.
...
...
@@ -313,7 +311,7 @@ createButton
Creates a callback function called to draw OpenGL on top of the image display by ``windowname`` .
:param button_name: Name of the button. If NULL, the name is ``button <number of buttons>`` .??
:param button_name: Name of the button.
:param on_change: Pointer to the function to be called every time the button changes its state. This function should be prototyped as ``void Foo(int state,*void);`` . *state* is the current state of the button. It could be -1 for a push button, 0 or 1 for a check/radio box button.
:param zeroZone: Half of the size of the dead region in the middle of the search zone over which the summation in the formula below is not done. It is used sometimes to avoid possible singularities of the autocorrelation matrix. The value of (-1,-1) indicates that there is no such a size.
:param criteria: Criteria for termination of the iterative process of corner refinement. That is, the process of corner position refinement stops either after a certain number of iterations or when a required accuracy is achieved. The ``criteria`` may specify either the maximum number of iteration or the required accuracy, or both of them.??
:param criteria: Criteria for termination of the iterative process of corner refinement. That is, the process of corner position refinement stops either after ``criteria.maxCount`` iterations or when the corner position moves by less than ``criteria.epsilon`` on some iteration.
The function iterates to find the sub-pixel accurate location of corners or radial saddle points, as shown on the picture below.
...
...
@@ -223,11 +223,11 @@ goodFeaturesToTrack
:param blockSize: Size of an average block for computing a derivative covariation matrix over each pixel neighborhood. See :func:`cornerEigenValsAndVecs` .
:param useHarrisDetector: Parameter indicating whether to use an operator or :func:`cornerMinEigenVal` .??
:param useHarrisDetector: Parameter indicating whether to use a Harris detector (see :func:`cornerHarris`) or :func:`cornerMinEigenVal`.
:param k: Free parameter of the Harris detector.
The function finds the most prominent corners in the image or in the specified image region, as described in Shi94:
The function finds the most prominent corners in the image or in the specified image region, as described in [Shi94]:
#.
Function calculates the corner quality measure at every source image pixel using the
* **INTER_LINEAR** - a bilinear interpolation (used by default)
* **INTER_AREA** - resampling using pixel area relation. It may be a preferred method for image decimation, as it gives freer?? results. But when the image is zoomed, it is similar to the ``INTER_NEAREST`` method.
* **INTER_AREA** - resampling using pixel area relation. It may be a preferred method for image decimation, as it gives moire'-free results. But when the image is zoomed, it is similar to the ``INTER_NEAREST`` method.
* **INTER_CUBIC** - a bicubic interpolation over 4x4 pixel neighborhood
:param dst: Destination image of the same size and depth as ``src`` .
:param code: Color space conversion code. See the details below.??/formatting/
:param code: Color space conversion code. See the description below.
:param dstCn: Number of channels in the destination image. If the parameter is 0, the number of the channels is derived automatically from ``src`` and ``code`` .
...
...
@@ -207,7 +207,7 @@ The function can do the following transformations:
If
:math:`H<0` then
:math:`H \leftarrow H+360` . On output
:math:`0 \leq V \leq 1`, :math:`0 \leq S \leq 1`, :math:`0 \leq H \leq 360` .??
:math:`0 \leq V \leq 1`, :math:`0 \leq S \leq 1`, :math:`0 \leq H \leq 360` .
The values are then converted to the destination data type:
...
...
@@ -414,7 +414,7 @@ distanceTransform
:param dst: Output image with calculated distances. It is a 32-bit floating-point, single-channel image of the same size as ``src`` .
:param distanceType: Type of distance. It can be ``CV_DIST_L1, CV_DIST_L2`` , or ``CV_DIST_C`` .
:param maskSize: Size of the distance transform mask. It can be 3, 5, or ``CV_DIST_MASK_PRECISE`` (the latter option is only supported by the first function??). In case of the ``CV_DIST_L1`` or ``CV_DIST_C`` distance type, the parameter is forced to 3 because a :math:`3\times 3` mask gives the same result as :math:`5\times 5` or any larger aperture.
:param maskSize: Size of the distance transform mask. It can be 3, 5, or ``CV_DIST_MASK_PRECISE`` (the latter option is only supported by the first function). In case of the ``CV_DIST_L1`` or ``CV_DIST_C`` distance type, the parameter is forced to 3 because a :math:`3\times 3` mask gives the same result as :math:`5\times 5` or any larger aperture.
:param labels: Optional output 2D array of labels (the discrete Voronoi diagram). It has the type ``CV_32SC1`` and the same size as ``src`` . See the details below.
...
...
@@ -500,58 +500,70 @@ floodFill
* **FLOODFILL_MASK_ONLY** If set, the function does not change the image ( ``newVal`` is ignored), but fills the mask. The flag can be used for the second variant only.
The functions ``floodFill`` fill a connected component starting from the seed point with the specified color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The pixel at
:math:`(x,y)` is considered to belong to the repainted domain if??:
* Grayscale image, floating range
:math:`(x,y)` is considered to belong to the repainted domain if:
:math:`src(x',y')` is the value of one of pixel neighbors that is already known to belong to the component. That is, to be added to the connected component, a color/brightness of the pixel should be close enough to:
*
Color/brightness of one of its neighbors that are already referred to in?? the connected component in case of floating range.
Color/brightness of one of its neighbors that already belong to the connected component in case of floating range.
*
Color/brightness of the seed point in case of fixed range.
Use these functions to either mark a connected component with the specified color in-place, or build a mask and then extract the contour, or copy the region to another image, and so on. Various modes of the function are demonstrated in the ``floodfill.c`` sample.
Use these functions to either mark a connected component with the specified color in-place, or build a mask and then extract the contour, or copy the region to another image, and so on. Various modes of the function are demonstrated in the ``floodfill.cpp`` sample.
Restores the selected region in an image using the region neighborhood.
:param src: Input 8-bit 1-channel or 3-channel image.
...
...
@@ -602,11 +614,11 @@ integral
:param sum: Integral image as :math:`(W+1)\times (H+1)` , 32-bit integer or floating-point (32f or 64f).
:param sqsum: Integral image for squared pixel values represented as?? :math:`(W+1)\times (H+1)` , double precision floating-point (64f).
:param sqsum: Integral image for squared pixel values. It will be :math:`(W+1)\times (H+1)`, double-precision floating-point (64f) array.
:param tilted: Integral for the image rotated by 45 degrees represented as :math:`(W+1)\times (H+1)` , with the same data type as ``sum`` .
:param tilted: Integral for the image rotated by 45 degrees. It will be :math:`(W+1)\times (H+1)` array with the same data type as ``sum``.
:param sdepth: Desired depth of the integral and the tilted integral images, ``CV_32S`` , ``CV_32F`` , or ``CV_64F`` .
:param sdepth: Desired depth of the integral and the tilted integral images, ``CV_32S``, ``CV_32F``, or ``CV_64F``.
The functions calculate one or more integral images for the source image as following:
...
...
@@ -727,9 +739,7 @@ watershed
The function implements one of the variants
of watershed, non-parametric marker-based segmentation algorithm,
described in
Meyer92??
. Before passing the image to the
described in [Meyer92]. Before passing the image to the
function, you have to roughly outline the desired regions in the image ``markers`` with positive (
:math:`>0` ) indices. So, every region is
represented as one or more connected components with the pixel values
...
...
@@ -766,9 +776,9 @@ grabCut
:param image: Input 8-bit 3-channel image.
:param mask: Input/output 8-bit single-channel mask. Its elements may have one of four values. The mask is initialized when ``mode==GC_INIT_WITH_RECT`` .
:param mask: Input/output 8-bit single-channel mask. The mask is initialized by the function when ``mode`` is set to ``GC_INIT_WITH_RECT``. Its elements may have one of following values:
* **GC_BGD** defines an obvious background pixel.??
* **GC_BGD** defines an obvious background pixels.
* **GC_FGD** defines an obvious foreground (object) pixel.
...
...
@@ -776,7 +786,7 @@ grabCut
* **GC_PR_BGD** defines a possible foreground pixel.
:param rect: ROI containing a segmented object. The pixels outside of the ROI are marked as "obvious background"??. The parameter is only used when ``mode==GC_INIT_WITH_RECT`` .
:param rect: ROI containing a segmented object. The pixels outside of the ROI are marked as "obvious background". The parameter is only used when ``mode==GC_INIT_WITH_RECT`` .
:param bgdModel, fgdModel: Temporary arrays used for segmentation. Do not modify them while you are processing the same image.
* **CV_CHAIN_APPROX_NONE** stores absolutely all contour points. That is, every 2 points of a contour stored with this method are 8?? connected neighbors of each other.
* **CV_CHAIN_APPROX_NONE** stores absolutely all the contour points. That is, any 2 subsequent points ``(x1,y1)`` and ``(x2,y2)`` of the contour will be either horizontal, vertical or diagonal neighbors, that is, ``max(abs(x1-x2),abs(y2-y1))==1``.
* **CV_CHAIN_APPROX_SIMPLE** compresses horizontal, vertical, and diagonal segments and leaves only their end points. For example, an up-right rectangular contour is encoded with 4 points.
...
...
@@ -227,7 +227,7 @@ approxPolyDP
Approximates a polygonal curve(s) with the specified precision.
:param curve: Polygon or curve to approximate. It must be :math:`1 \times N` or :math:`N \times 1` matrix of type ``CV_32SC2`` or ``CV_32FC2`` . You can also convert ``vector<Point>`` or ``vector<Point2f`` >?? to the matrix by calling the ``Mat(const vector<T>&)`` constructor.
:param curve: Polygon or curve to approximate. It must be :math:`1 \times N` or :math:`N \times 1` matrix of type ``CV_32SC2`` or ``CV_32FC2`` . You can also convert ``vector<Point>`` or ``vector<Point2f>`` to the matrix by calling the ``Mat(const vector<T>&)`` constructor.
:param approxCurve: Result of the approximation. The type should match the type of the input curve.
...
...
@@ -320,7 +320,7 @@ estimateAffine3D
:param ransacThreshold: Maximum reprojection error in the RANSAC algorithm to consider a point as an inlier.
:param confidence: Confidence level, between 0 and 1, to estimate a matrix.??
:param confidence: The confidence level, between 0 and 1, that the estimated transformation will have. Anything between 0.95 and 0.99 is usually good enough. Too close to 1 values can slow down the estimation too much, lower than 0.8-0.9 confidence values can result in an incorrectly estimated transformation.
The function estimates an optimal 3D affine transformation between two 3D point sets using the RANSAC algorithm.
:param points: Input 2D point set represented either by ``CV_32SC2`` or ``CV_32FC2`` matrix, or by ``vector<Point>`` /``vector<Point2f>`` converted to a matrix using the ``Mat(const vector<T>&)`` constructor.
:param points: Input 2D point set represented either by ``CV_32SC2`` or ``CV_32FC2`` matrix, or by ``vector<Point>`` or ``vector<Point2f>``.
The function calculates the ellipse that fits (in least-squares sense) a set of 2D points best of all. It returns the rotated rectangle in which the ellipse is inscribed.
...
...
@@ -397,18 +397,13 @@ The function calculates the ellipse that fits (in least-squares sense) a set of
:param points: Input 2D point set represented either by ``CV_32SC2`` or ``CV_32FC2`` matrix, or by ``vector<Point>`` /``vector<Point2f>`` / ``vector<Point3i>`` /``vector<Point3f>`` converted to a matrix by the ``Mat(const vector<T>&)`` constructor.
:param points: Input 2D or 3D point set represented either by ``CV_32SC2`` or ``CV_32FC2`` matrix, or by ``vector<Point>``, ``vector<Point2f>``, ``vector<Point3i>`` or ``vector<Point3f>``.
:param line: Output line parameters. In case of 2D fitting,
it is a vector of 4 floats ``(vx, vy, x0, y0)`` where ``(vx, vy)`` is a normalized vector collinear to the
line and ``(x0, y0)`` is a point on the line. In case of
3D fitting, it is a vector of 6 floats ``(vx, vy, vz, x0, y0, z0)`` where ``(vx, vy, vz)`` is a normalized vector collinear to the line and ``(x0, y0, z0)`` is a point on the line.
:param line: Output line parameters. In case of 2D fitting it should be ``Vec4f``, a vector of 4 floats ``(vx, vy, x0, y0)``, where ``(vx, vy)`` is a normalized vector collinear to the line and ``(x0, y0)`` is a point on the line. In case of 3D fitting, it should be ``Vec6f``, a vector of 6 floats ``(vx, vy, vz, x0, y0, z0)``, where ``(vx, vy, vz)`` is a normalized vector collinear to the line and ``(x0, y0, z0)`` is a point on the line.
:param distType: Distance used by the M-estimator (see the discussion).
...
...
@@ -416,7 +411,7 @@ fitLine
:param reps, aeps: Sufficient accuracy for the radius (distance between the coordinate origin and the line) and angle, respectively. 0.01 would be a good default value for both.
The functions ``fitLine`` fit a line to a 2D or 3D point set by minimizing
The function ``fitLine`` fits a line to a 2D or 3D point set by minimizing
:param contour: Tested contour, a matrix of type ``CV_32SC2`` or ``CV_32FC2`` , or ``vector<Point>`` /``vector<Point2f>`` converted to the matrix using the ``Mat(const vector<T>&)`` constructor.??
:param contour: Tested contour, a matrix of type ``CV_32SC2`` or ``CV_32FC2`` , or ``vector<Point>`` or ``vector<Point2f>``.
The function tests whether the input contour is convex or not. The contour must be simple, that is, without self-intersections. Otherwise, the function output is undefined.
...
...
@@ -480,35 +475,35 @@ The function tests whether the input contour is convex or not. The contour must
Finds a rotated rectangle of the minimum area enclosing a 2D point set.??
Finds a rotated rectangle of the minimum area enclosing the input 2D point set.
:param points: Input 2D point set represented either by ``CV_32SC2`` or ``CV_32FC2`` matrix, or by ``vector<Point>`` /``vector<Point2f>`` converted to the matrix using the ``Mat(const vector<T>&)`` constructor.
:param points: Input 2D point set represented either by ``CV_32SC2`` or ``CV_32FC2`` matrix, or by ``vector<Point>`` or ``vector<Point2f>``.
The function calculates and returns the minimum-area bounding rectangle (possibly rotated) for a specified point set. See the OpenCV sample ``minarea.c`` .
The function calculates and returns the minimum-area bounding rectangle (possibly rotated) for a specified point set. See the OpenCV sample ``minarea.cpp`` .
Finds a circle of the minimum area enclosing a 2D point set.
:param points: Input 2D point set represented either by ``CV_32SC2`` or ``CV_32FC2`` matrix, or by ``vector<Point>`` /``vector<Point2f>`` converted to the matrix using the ``Mat(const vector<T>&)`` constructor.
:param points: Input 2D point set represented either by ``CV_32SC2`` or ``CV_32FC2`` matrix, or by ``vector<Point>`` or ``vector<Point2f>``.
:param center: Output center of the circle.
:param radius: Output radius of the circle.
The function finds the minimal enclosing circle of a 2D point set using an iterative algorithm. See the OpenCV sample ``minarea.c`` .
The function finds the minimal enclosing circle of a 2D point set using an iterative algorithm. See the OpenCV sample ``minarea.cpp`` .
* **OPTFLOW_USE_INITIAL_FLOW** Use initial estimations stored in ``nextPts`` . If the flag is not set, then initially?? :math:`\texttt{nextPts}\leftarrow\texttt{prevPts}` .
* **OPTFLOW_USE_INITIAL_FLOW** Use initial estimations stored in ``nextPts`` . If the flag is not set, then ``prevPts`` is copied to ``nextPts`` and is considered as the initial estimate.
The function implements a sparse iterative version of the Lucas-Kanade optical flow in pyramids. See
Bouguet00
...
...
@@ -122,7 +122,7 @@ calcMotionGradient
:param mask: Output mask image that has the type ``CV_8UC1`` and the same size as ``mhi`` . Its non-zero elements mark pixels where the motion gradient data is correct.
:param orientation: Output motion gradient orientation image that has the same type and the same size as ``mhi`` . Each pixel of the image is a motion orientation in degrees, from 0 to 360.??
:param orientation: Output motion gradient orientation image that has the same type and the same size as ``mhi`` . Each pixel of the image is a motion orientation, from 0 to 360 degrees.
:param delta1, delta2: Minimum and maximum allowed difference between ``mhi`` values within a pixel neighorhood. That is, the function finds the minimum ( :math:`m(x,y)` ) and maximum ( :math:`M(x,y)` ) ``mhi`` values over :math:`3 \times 3` neighborhood of each pixel and marks the motion orientation at :math:`(x, y)` as valid only if