Class Line2D
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
2-dimentional line vector
public class Line2D
- Inheritance
-
Line2D
- Inherited Members
Constructors
Line2D(double, double, double, double)
Initializes this object
public Line2D(double vx, double vy, double x1, double y1)
Parameters
vxdoubleThe X component of the normalized vector collinear to the line
vydoubleThe Y component of the normalized vector collinear to the line
x1doubleZ-coordinate of some point on the line
y1doubleZ-coordinate of some point on the line
Line2D(float[])
Initializes by cvFitLine output
public Line2D(float[] line)
Parameters
linefloat[]The returned value from cvFitLine
Properties
Vx
The X component of the normalized vector collinear to the line
public double Vx { get; }
Property Value
Vy
The Y component of the normalized vector collinear to the line
public double Vy { get; }
Property Value
X1
X-coordinate of some point on the line
public double X1 { get; }
Property Value
Y1
Y-coordinate of some point on the line
public double Y1 { get; }
Property Value
Methods
Distance(Point)
Returns the distance between this line and the specified point
public double Distance(Point point)
Parameters
pointPoint
Returns
Distance(Point2d)
Returns the distance between this line and the specified point
public double Distance(Point2d point)
Parameters
pointPoint2d
Returns
Distance(Point2f)
Returns the distance between this line and the specified point
public double Distance(Point2f point)
Parameters
pointPoint2f
Returns
Distance(double, double)
Returns the distance between this line and the specified point
public double Distance(double x, double y)
Parameters
Returns
FitSize(int, int, out Point, out Point)
Fits this line to the specified size (for drawing)
public void FitSize(int width, int height, out Point pt1, out Point pt2)
Parameters
widthintWidth of fit size
heightintHeight of fit size
pt1Point1st edge point of fitted line
pt2Point2nd edge point of fitted line
GetVectorAngle()
public double GetVectorAngle()
Returns
GetVectorRadian()
public double GetVectorRadian()