Table of Contents

Struct LineSegmentPoint

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

Line segment structure retrieved from cvHoughLines2

[Serializable]
[SuppressMessage("Design", "CA1051: Do not declare visible instance fields")]
public struct LineSegmentPoint : IEquatable<LineSegmentPoint>
Implements
Inherited Members

Constructors

LineSegmentPoint(Point, Point)

Constructor

public LineSegmentPoint(Point p1, Point p2)

Parameters

p1 Point

1st Point

p2 Point

2nd Point

Fields

P1

1st Point

public Point P1

Field Value

Point

P2

2nd Point

public Point P2

Field Value

Point

Methods

Equals(LineSegmentPoint)

Specifies whether this object contains the same members as the specified Object.

public bool Equals(LineSegmentPoint other)

Parameters

other LineSegmentPoint

The Object to test.

Returns

bool

This method returns true if obj is the same type as this object and has the same members as this object.

Equals(object?)

Specifies whether this object contains the same members as the specified Object.

public override bool Equals(object? obj)

Parameters

obj object

The Object to test.

Returns

bool

This method returns true if obj is the same type as this object and has the same members as this object.

GetHashCode()

Returns a hash code for this object.

public override int GetHashCode()

Returns

int

An integer value that specifies a hash value for this object.

IntersectedLineAndSegment(LineSegmentPoint, LineSegmentPoint)

Returns a boolean value indicating whether a line and a segment intersect.

public static bool IntersectedLineAndSegment(LineSegmentPoint line, LineSegmentPoint seg)

Parameters

line LineSegmentPoint

Line

seg LineSegmentPoint

Segment

Returns

bool

IntersectedSegments(LineSegmentPoint)

Returns a boolean value indicating whether the specified two segments intersect.

public bool IntersectedSegments(LineSegmentPoint seg)

Parameters

seg LineSegmentPoint

Returns

bool

IntersectedSegments(LineSegmentPoint, LineSegmentPoint)

Returns a boolean value indicating whether the specified two segments intersect.

public static bool IntersectedSegments(LineSegmentPoint seg1, LineSegmentPoint seg2)

Parameters

seg1 LineSegmentPoint
seg2 LineSegmentPoint

Returns

bool

Length()

public double Length()

Returns

double

LineAndSegmentIntersection(LineSegmentPoint, LineSegmentPoint)

Calculates a intersection of a line and a segment

public static Point? LineAndSegmentIntersection(LineSegmentPoint line, LineSegmentPoint seg)

Parameters

line LineSegmentPoint
seg LineSegmentPoint

Returns

Point?

LineIntersection(LineSegmentPoint)

Calculates a intersection of the specified two lines

public Point? LineIntersection(LineSegmentPoint line)

Parameters

line LineSegmentPoint

Returns

Point?

LineIntersection(LineSegmentPoint, LineSegmentPoint)

Calculates a intersection of the specified two lines

public static Point? LineIntersection(LineSegmentPoint line1, LineSegmentPoint line2)

Parameters

line1 LineSegmentPoint
line2 LineSegmentPoint

Returns

Point?

Offset(Point)

Translates the Point by the specified amount.

public void Offset(Point p)

Parameters

p Point

The Point used offset this CvPoint.

Offset(int, int)

Translates the Point by the specified amount.

public void Offset(int x, int y)

Parameters

x int

The amount to offset the x-coordinate.

y int

The amount to offset the y-coordinate.

SegmentIntersection(LineSegmentPoint)

Calculates a intersection of the specified two segments

public Point? SegmentIntersection(LineSegmentPoint seg)

Parameters

seg LineSegmentPoint

Returns

Point?

SegmentIntersection(LineSegmentPoint, LineSegmentPoint)

Calculates a intersection of the specified two segments

public static Point? SegmentIntersection(LineSegmentPoint seg1, LineSegmentPoint seg2)

Parameters

seg1 LineSegmentPoint
seg2 LineSegmentPoint

Returns

Point?

ToString()

Converts this object to a human readable string.

public override string ToString()

Returns

string

A string that represents this object.

Operators

operator ==(LineSegmentPoint, LineSegmentPoint)

Compares two CvPoint objects. The result specifies whether the members of each object are equal.

public static bool operator ==(LineSegmentPoint lhs, LineSegmentPoint rhs)

Parameters

lhs LineSegmentPoint

A Point to compare.

rhs LineSegmentPoint

A Point to compare.

Returns

bool

This operator returns true if the members of left and right are equal; otherwise, false.

operator !=(LineSegmentPoint, LineSegmentPoint)

Compares two CvPoint objects. The result specifies whether the members of each object are unequal.

public static bool operator !=(LineSegmentPoint lhs, LineSegmentPoint rhs)

Parameters

lhs LineSegmentPoint

A Point to compare.

rhs LineSegmentPoint

A Point to compare.

Returns

bool

This operator returns true if the members of left and right are unequal; otherwise, false.