Initializes line iterator
Namespace: OpenCvSharp
Assembly: OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static int InitLineIterator( CvArr image, CvPoint pt1, CvPoint pt2, out CvLineIterator lineIterator )
Parameters
- image
- Type: OpenCvSharpCvArr
Image to sample the line from. - pt1
- Type: OpenCvSharpCvPoint
First ending point of the line segment. - pt2
- Type: OpenCvSharpCvPoint
Second ending point of the line segment. - lineIterator
- Type: OpenCvSharpCvLineIterator
Line iterator state structure to be generated.
Return Value
Type: Int32The function cvInitLineIterator initializes the line iterator and returns the number of pixels between two end points. Both points must be inside the image. After the iterator has been initialized, all the points on the raster line that connects the two ending points may be retrieved by successive calls of NextLinePoint point. The points on the line are calculated one by one using 4-connected or 8-connected Bresenham algorithm.
See Also