CvLineIterator Constructor (CvArr, CvPoint, CvPoint, PixelConnectivity, Boolean) OpenCvSharp Class Library
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,
	bool leftToRight
)

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.
leftToRight
Type: SystemBoolean
The flag, indicating whether the line should be always scanned from the left-most point to the right-most out of pt1 and pt2 (leftToRight=true), or it is scanned in the specified order, from pt1 to pt2 (leftToRight=false).

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

Reference