mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge branch 4.x
This commit is contained in:
@@ -3576,10 +3576,11 @@ a mask and then extract the contour, or copy the region to another image, and so
|
||||
function unless the #FLOODFILL_MASK_ONLY flag is set in the second variant of the function. See
|
||||
the details below.
|
||||
@param mask Operation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels
|
||||
taller than image. Since this is both an input and output parameter, you must take responsibility
|
||||
of initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example,
|
||||
taller than image. If an empty Mat is passed it will be created automatically. Since this is both an
|
||||
input and output parameter, you must take responsibility of initializing it.
|
||||
Flood-filling cannot go across non-zero pixels in the input mask. For example,
|
||||
an edge detector output can be used as a mask to stop filling at edges. On output, pixels in the
|
||||
mask corresponding to filled pixels in the image are set to 1 or to the a value specified in flags
|
||||
mask corresponding to filled pixels in the image are set to 1 or to the specified value in flags
|
||||
as described below. Additionally, the function fills the border of the mask with ones to simplify
|
||||
internal processing. It is therefore possible to use the same mask in multiple calls to the function
|
||||
to make sure the filled areas do not overlap.
|
||||
@@ -4956,13 +4957,13 @@ CV_EXPORTS_W Rect getTextSize( Size imgsize, const String& text, Point org,
|
||||
FontFace& fface, int size, int weight=0,
|
||||
PutTextFlags flags=PUT_TEXT_ALIGN_LEFT, Range wrap=Range() );
|
||||
|
||||
/** @brief Line iterator
|
||||
|
||||
The class is used to iterate over all the pixels on the raster line
|
||||
segment connecting two specified points.
|
||||
|
||||
The class LineIterator is used to get each pixel of a raster line. It
|
||||
can be treated as versatile implementation of the Bresenham algorithm
|
||||
/** @brief Class for iterating over all pixels on a raster line segment.
|
||||
|
||||
The class LineIterator is used to get each pixel of a raster line connecting
|
||||
two specified points.
|
||||
It can be treated as a versatile implementation of the Bresenham algorithm
|
||||
where you can stop at each pixel and do some extra processing, for
|
||||
example, grab pixel values along the line or draw a line with an effect
|
||||
(for example, with XOR operation).
|
||||
@@ -4991,14 +4992,19 @@ for(int i = 0; i < it2.count; i++, ++it2)
|
||||
class CV_EXPORTS LineIterator
|
||||
{
|
||||
public:
|
||||
/** @brief initializes the iterator
|
||||
/** @brief Initializes iterator object for the given line and image.
|
||||
|
||||
creates iterators for the line connecting pt1 and pt2
|
||||
the line will be clipped on the image boundaries
|
||||
the line is 8-connected or 4-connected
|
||||
If leftToRight=true, then the iteration is always done
|
||||
from the left-most point to the right most,
|
||||
not to depend on the ordering of pt1 and pt2 parameters;
|
||||
The returned iterator can be used to traverse all pixels on a line that
|
||||
connects the given two points.
|
||||
The line will be clipped on the image boundaries.
|
||||
|
||||
@param img Underlying image.
|
||||
@param pt1 First endpoint of the line.
|
||||
@param pt2 The other endpoint of the line.
|
||||
@param connectivity Pixel connectivity of the iterator. Valid values are 4 (iterator can move
|
||||
up, down, left and right) and 8 (iterator can also move diagonally).
|
||||
@param leftToRight If true, the line is traversed from the leftmost endpoint to the rightmost
|
||||
endpoint. Otherwise, the line is traversed from \p pt1 to \p pt2.
|
||||
*/
|
||||
LineIterator( const Mat& img, Point pt1, Point pt2,
|
||||
int connectivity = 8, bool leftToRight = false )
|
||||
@@ -5031,16 +5037,23 @@ public:
|
||||
}
|
||||
void init(const Mat* img, Rect boundingAreaRect, Point pt1, Point pt2, int connectivity, bool leftToRight);
|
||||
|
||||
/** @brief returns pointer to the current pixel
|
||||
/** @brief Returns pointer to the current pixel.
|
||||
*/
|
||||
uchar* operator *();
|
||||
/** @brief prefix increment operator (++it). shifts iterator to the next pixel
|
||||
|
||||
/** @brief Moves iterator to the next pixel on the line.
|
||||
|
||||
This is the prefix version (++it).
|
||||
*/
|
||||
LineIterator& operator ++();
|
||||
/** @brief postfix increment operator (it++). shifts iterator to the next pixel
|
||||
|
||||
/** @brief Moves iterator to the next pixel on the line.
|
||||
|
||||
This is the postfix version (it++).
|
||||
*/
|
||||
LineIterator operator ++(int);
|
||||
/** @brief returns coordinates of the current pixel
|
||||
|
||||
/** @brief Returns coordinates of the current pixel.
|
||||
*/
|
||||
Point pos() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user