Class Line2D
2-dimentional line vector
Inheritance
Inherited Members
Namespace: OpenCvSharp
Assembly: OpenCvSharp.dll
Syntax
public class Line2D
Constructors
| Improve this Doc View SourceLine2D(Double, Double, Double, Double)
Initializes this object
Declaration
public Line2D(double vx, double vy, double x1, double y1)
Parameters
Type | Name | Description |
---|---|---|
System.Double | vx | The X component of the normalized vector collinear to the line |
System.Double | vy | The Y component of the normalized vector collinear to the line |
System.Double | x1 | Z-coordinate of some point on the line |
System.Double | y1 | Z-coordinate of some point on the line |
Line2D(Single[])
Initializes by cvFitLine output
Declaration
public Line2D(float[] line)
Parameters
Type | Name | Description |
---|---|---|
System.Single[] | line | The returned value from cvFitLine |
Properties
| Improve this Doc View SourceVx
The X component of the normalized vector collinear to the line
Declaration
public double Vx { get; }
Property Value
Type | Description |
---|---|
System.Double |
Vy
The Y component of the normalized vector collinear to the line
Declaration
public double Vy { get; }
Property Value
Type | Description |
---|---|
System.Double |
X1
X-coordinate of some point on the line
Declaration
public double X1 { get; }
Property Value
Type | Description |
---|---|
System.Double |
Y1
Y-coordinate of some point on the line
Declaration
public double Y1 { get; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
| Improve this Doc View SourceDistance(Point)
Returns the distance between this line and the specified point
Declaration
public double Distance(Point point)
Parameters
Type | Name | Description |
---|---|---|
OpenCvSharp.Point | point |
Returns
Type | Description |
---|---|
System.Double |
Distance(Point2d)
Returns the distance between this line and the specified point
Declaration
public double Distance(Point2d point)
Parameters
Type | Name | Description |
---|---|---|
OpenCvSharp.Point2d | point |
Returns
Type | Description |
---|---|
System.Double |
Distance(Point2f)
Returns the distance between this line and the specified point
Declaration
public double Distance(Point2f point)
Parameters
Type | Name | Description |
---|---|---|
OpenCvSharp.Point2f | point |
Returns
Type | Description |
---|---|
System.Double |
Distance(Double, Double)
Returns the distance between this line and the specified point
Declaration
public double Distance(double x, double y)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | |
System.Double | y |
Returns
Type | Description |
---|---|
System.Double |
FitSize(Int32, Int32, out Point, out Point)
Fits this line to the specified size (for drawing)
Declaration
public void FitSize(int width, int height, out Point pt1, out Point pt2)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | width | Width of fit size |
System.Int32 | height | Height of fit size |
OpenCvSharp.Point | pt1 | 1st edge point of fitted line |
OpenCvSharp.Point | pt2 | 2nd edge point of fitted line |
GetVectorAngle()
Declaration
public double GetVectorAngle()
Returns
Type | Description |
---|---|
System.Double |
GetVectorRadian()
Declaration
public double GetVectorRadian()
Returns
Type | Description |
---|---|
System.Double |