Initializes line iterator
Namespace: OpenCvSharp
Assembly: OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public CvLineIterator( CvArr image, CvPoint pt1, CvPoint pt2, PixelConnectivity connectivity )
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. - connectivity
- Type: OpenCvSharpPixelConnectivity
The scanned line connectivity, 4 or 8.
Return Value
Type:The 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