Table of Contents

Struct LineSegment2D

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

A line segment

public struct LineSegment2D
Inherited Members

Constructors

LineSegment2D(Point, Point)

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

public LineSegment2D(Point p1, Point p2)

Parameters

p1 Point

The first point on the line segment

p2 Point

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 Point P1 { get; set; }

Property Value

Point

P2

An other point on the line

public Point P2 { get; set; }

Property Value

Point

Methods

GetExteriorAngleDegree(LineSegment2D)

Get the exterior angle between this line and otherLine

public double GetExteriorAngleDegree(LineSegment2D otherLine)

Parameters

otherLine LineSegment2D

The other line

Returns

double

The exterior angle between this line and otherLine

Side(Point)

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

public int Side(Point point)

Parameters

point Point

the point

Returns

int

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