Table of Contents

Struct LineSegment2DF

Namespace
Emgu.CV.Structure
Assembly
Emgu.CV.dll

A line segment

public struct LineSegment2DF
Inherited Members

Constructors

LineSegment2DF(PointF, PointF)

Create a line segment with the specific start point and end point

public LineSegment2DF(PointF p1, PointF p2)

Parameters

p1 PointF

The first point on the line segment

p2 PointF

The second point on the line segment

Properties

Direction

The direction of the line, the norm of which is 1

public PointF Direction { get; }

Property Value

PointF

Length

Get the length of the line segment

public double Length { get; }

Property Value

double

P1

A point on the line

public PointF P1 { get; set; }

Property Value

PointF

P2

An other point on the line

public PointF P2 { get; set; }

Property Value

PointF

Methods

GetExteriorAngleDegree(LineSegment2DF)

Get the exterior angle between this line and otherLine

public double GetExteriorAngleDegree(LineSegment2DF otherLine)

Parameters

otherLine LineSegment2DF

The other line

Returns

double

The exterior angle between this line and otherLine

Side(PointF)

Determin which side of the line the 2D point is at

public int Side(PointF point)

Parameters

point PointF

the point

Returns

int

1 if on the right hand side; 0 if on the line; -1 if on the left hand side;

YByX(float)

Obtain the Y value from the X value using first degree interpolation

public float YByX(float x)

Parameters

x float

The X value

Returns

float

The Y value