eVision .NET API
Loading...
Searching...
No Matches
eVision.ELineDetector Class Reference

Detects straight lines in a BW8 image using Hough transform. More...

Inheritance diagram for eVision.ELineDetector:
Collaboration diagram for eVision.ELineDetector:

Public Member Functions

 ELineDetector (eVision.ELineDetector other)
 Copy operator.
 ELineDetector ()
 Constructs an ELineDetector.ELineDetector with all parameters explicitly specified.
 ELineDetector (float rho, float theta, int threshold, float minLineLength, float maxLineGap, float angleThresholdDegrees)
 Copy operator.
void Save (string path)
 Saves the detector configuration to a file.
void Load (string path)
 Loads a detector configuration from a file.
void Save (eVision.ESerializer serializer)
 Saves the detector configuration to a serializer.
void Load (eVision.ESerializer serializer)
 Loads a detector configuration from a serializer.
eVision.ELine[] Detect (eVision.EROIBW8 image)
 Detects straight lines in the given BW8 image.
eVision.ELine[] Detect (eVision.EROIBW8 image, eVision.ERegion region, eVision.EFrame frame)
 Detects lines in the area of the image covered by region (transformed to sensor coordinates via frame), then maps results back to local frame coordinates.
eVision.ELine[] Detect (eVision.EROIBW8 image, eVision.ERegion region)
 Detects lines in the area of the image covered by region.
eVision.ELine[] Detect (eVision.EROIBW8 image, eVision.EFrame frame)
 Detects lines in the image and maps results to local frame coordinates via frame.
eVision.ELine[] Detect (eVision.ERegion region, eVision.EFrame frame)
 Transforms region to sensor coordinates via frame, converts it to a binary image, detects lines, then maps results back to local frame coordinates.
eVision.ELine[] Detect (eVision.ERegion region)
 Converts region to a binary image and detects lines in it.
void StopProcess ()
 Thread-safe. Requests the Detect call running on another thread to stop as soon as possible; it then returns no lines. The request is discarded when the next Detect call starts.

Properties

float RadialBinSize [get, set]
 Distance resolution of the accumulator in pixels. Default is 1.
float AngularBinSize [get, set]
 Angle resolution of the accumulator in degrees. Default is 1.
int MinNumVotes [get, set]
 Minimum number of votes to qualify as a line. Default is 150.
float MinLineLength [get, set]
 Minimum length of a detected line segment in pixels. Shorter segments are discarded. Default is 164.
float MaxLineGap [get, set]
 Maximum gap between two collinear segments to still merge them into one line. Default is 64.
float AngleThreshold [get, set]
 Maximum angular difference in degrees between two segments to consider them part of the same line. Default is 35°.
eVision.ELine[] SegmentsBeforeMerging [get]
 Returns the raw line segments that were merged to build the lines, as returned by the last call to ELineDetector.Detect.

Detailed Description

Detects straight lines in a BW8 image using Hough transform.

License(s): EasyImage

Constructor & Destructor Documentation

◆ ELineDetector() [1/3]

eVision.ELineDetector.ELineDetector ( eVision.ELineDetector other)

Copy operator.

Parameters
otherAnother ELineDetector.

◆ ELineDetector() [2/3]

eVision.ELineDetector.ELineDetector ( )

Constructs an ELineDetector.ELineDetector with all parameters explicitly specified.

◆ ELineDetector() [3/3]

eVision.ELineDetector.ELineDetector ( float rho,
float theta,
int threshold,
float minLineLength,
float maxLineGap,
float angleThresholdDegrees )

Copy operator.

Member Function Documentation

◆ Detect() [1/6]

eVision.ELine[] eVision.ELineDetector.Detect ( eVision.ERegion region)

Converts region to a binary image and detects lines in it.

Parameters
regionRegion to convert and detect lines in.

◆ Detect() [2/6]

eVision.ELine[] eVision.ELineDetector.Detect ( eVision.ERegion region,
eVision.EFrame frame )

Transforms region to sensor coordinates via frame, converts it to a binary image, detects lines, then maps results back to local frame coordinates.

Parameters
regionRegion in local frame coordinates.
frameFrame used to transform region and results.

◆ Detect() [3/6]

eVision.ELine[] eVision.ELineDetector.Detect ( eVision.EROIBW8 image)

Detects straight lines in the given BW8 image.

Parameters
imageInput BW8 image.

◆ Detect() [4/6]

eVision.ELine[] eVision.ELineDetector.Detect ( eVision.EROIBW8 image,
eVision.EFrame frame )

Detects lines in the image and maps results to local frame coordinates via frame.

Parameters
imageInput BW8 image.
frameFrame used to transform results to local coordinates.

◆ Detect() [5/6]

eVision.ELine[] eVision.ELineDetector.Detect ( eVision.EROIBW8 image,
eVision.ERegion region )

Detects lines in the area of the image covered by region.

Parameters
imageInput BW8 image.
regionRegion of interest in image coordinates.

◆ Detect() [6/6]

eVision.ELine[] eVision.ELineDetector.Detect ( eVision.EROIBW8 image,
eVision.ERegion region,
eVision.EFrame frame )

Detects lines in the area of the image covered by region (transformed to sensor coordinates via frame), then maps results back to local frame coordinates.

Parameters
imageInput BW8 image.
regionRegion of interest in local frame coordinates.
frameFrame used to transform region and results.

◆ Load() [1/2]

void eVision.ELineDetector.Load ( eVision.ESerializer serializer)

Loads a detector configuration from a serializer.

Parameters
serializerSource serializer in read mode.

◆ Load() [2/2]

void eVision.ELineDetector.Load ( string path)

Loads a detector configuration from a file.

Parameters
pathPath to the input file.

◆ Save() [1/2]

void eVision.ELineDetector.Save ( eVision.ESerializer serializer)

Saves the detector configuration to a serializer.

Parameters
serializerTarget serializer in write mode.

◆ Save() [2/2]

void eVision.ELineDetector.Save ( string path)

Saves the detector configuration to a file.

Parameters
pathPath to the output file.

◆ StopProcess()

void eVision.ELineDetector.StopProcess ( )

Thread-safe. Requests the Detect call running on another thread to stop as soon as possible; it then returns no lines. The request is discarded when the next Detect call starts.

Property Documentation

◆ AngleThreshold

float eVision.ELineDetector.AngleThreshold
getset

Maximum angular difference in degrees between two segments to consider them part of the same line. Default is 35°.

◆ AngularBinSize

float eVision.ELineDetector.AngularBinSize
getset

Angle resolution of the accumulator in degrees. Default is 1.

◆ MaxLineGap

float eVision.ELineDetector.MaxLineGap
getset

Maximum gap between two collinear segments to still merge them into one line. Default is 64.

◆ MinLineLength

float eVision.ELineDetector.MinLineLength
getset

Minimum length of a detected line segment in pixels. Shorter segments are discarded. Default is 164.

◆ MinNumVotes

int eVision.ELineDetector.MinNumVotes
getset

Minimum number of votes to qualify as a line. Default is 150.

◆ RadialBinSize

float eVision.ELineDetector.RadialBinSize
getset

Distance resolution of the accumulator in pixels. Default is 1.

◆ SegmentsBeforeMerging

eVision.ELine [] eVision.ELineDetector.SegmentsBeforeMerging
get

Returns the raw line segments that were merged to build the lines, as returned by the last call to ELineDetector.Detect.