Table of Contents

Struct LineSegmentPolar

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

Polar line segment retrieved from cvHoughLines2

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

Constructors

LineSegmentPolar(float, float)

Constructor

public LineSegmentPolar(float rho, float theta)

Parameters

rho float

Length of the line

theta float

Angle of the line (radian)

Fields

Rho

Length of the line

public float Rho

Field Value

float

Theta

Angle of the line (radian)

public float Theta

Field Value

float

Methods

Equals(LineSegmentPolar)

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

public bool Equals(LineSegmentPolar other)

Parameters

other LineSegmentPolar

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.

LineIntersection(LineSegmentPolar)

Calculates a intersection of the specified two lines

public Point? LineIntersection(LineSegmentPolar line)

Parameters

line LineSegmentPolar

Returns

Point?

LineIntersection(LineSegmentPolar, LineSegmentPolar)

Calculates a intersection of the specified two lines

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

Parameters

line1 LineSegmentPolar
line2 LineSegmentPolar

Returns

Point?

ToSegmentPoint(double)

Convert To LineSegmentPoint

public LineSegmentPoint ToSegmentPoint(double scale)

Parameters

scale double

Returns

LineSegmentPoint

ToSegmentPointX(int, int)

Converts to a line segment with the specified x coordinates at both ends

public LineSegmentPoint ToSegmentPointX(int x1, int x2)

Parameters

x1 int
x2 int

Returns

LineSegmentPoint

ToSegmentPointY(int, int)

Converts to a line segment with the specified y coordinates at both ends

public LineSegmentPoint ToSegmentPointY(int y1, int y2)

Parameters

y1 int
y2 int

Returns

LineSegmentPoint

ToString()

Converts this object to a human readable string.

public override string ToString()

Returns

string

A string that represents this object.

XPosOfLine(int)

public int? XPosOfLine(int y)

Parameters

y int

Returns

int?

YPosOfLine(int)

public int? YPosOfLine(int x)

Parameters

x int

Returns

int?

Operators

operator ==(LineSegmentPolar, LineSegmentPolar)

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

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

Parameters

lhs LineSegmentPolar

A Point to compare.

rhs LineSegmentPolar

A Point to compare.

Returns

bool

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

operator !=(LineSegmentPolar, LineSegmentPolar)

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

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

Parameters

lhs LineSegmentPolar

A Point to compare.

rhs LineSegmentPolar

A Point to compare.

Returns

bool

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