Show / Hide Table of Contents

Class Line2D

2-dimentional line vector

Inheritance
System.Object
Line2D
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OpenCvSharp
Assembly: OpenCvSharp.dll
Syntax
public class Line2D

Constructors

| Improve this Doc View Source

Line2D(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

| Improve this Doc View Source

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 Source

Vx

The X component of the normalized vector collinear to the line

Declaration
public double Vx { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Vy

The Y component of the normalized vector collinear to the line

Declaration
public double Vy { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

X1

X-coordinate of some point on the line

Declaration
public double X1 { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

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 Source

Distance(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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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

| Improve this Doc View Source

GetVectorAngle()

Declaration
public double GetVectorAngle()
Returns
Type Description
System.Double
| Improve this Doc View Source

GetVectorRadian()

Declaration
public double GetVectorRadian()
Returns
Type Description
System.Double
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX