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

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

Public Member Functions

None __init__ (self, eVision.ELineDetector other)
 Copy operator.
None __init__ (self)
 Constructs an eVision.ELineDetector.__init__ with all parameters explicitly specified.
None __init__ (self, float rho, float theta, int threshold, float minLineLength, float maxLineGap, float angleThresholdDegrees)
 Copy operator.
None Save (self, str path)
 Saves the detector configuration to a file.
None Save (self, eVision.ESerializer|None serializer)
 Saves the detector configuration to a serializer.
None Load (self, str path)
 Loads a detector configuration from a file.
None Load (self, eVision.ESerializer|None serializer)
 Loads a detector configuration from a serializer.
list[eVision._eVision.ELine] Detect (self, eVision.EROIBW8 image)
 Detects straight lines in the given BW8 image.
list[eVision._eVision.ELine] Detect (self, 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.
list[eVision._eVision.ELine] Detect (self, eVision.EROIBW8 image, eVision.ERegion region)
 Detects lines in the area of the image covered by region.
list[eVision._eVision.ELine] Detect (self, eVision.EROIBW8 image, eVision.EFrame frame)
 Detects lines in the image and maps results to local frame coordinates via frame.
list[eVision._eVision.ELine] Detect (self, 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.
list[eVision._eVision.ELine] Detect (self, eVision.ERegion region)
 Converts region to a binary image and detects lines in it.
None StopProcess (self)
 Thread-safe.

Properties

 RadialBinSize = property(_RadialBinSize__getter, _RadialBinSize__setter)
 Distance resolution of the accumulator in pixels.
 AngularBinSize = property(_AngularBinSize__getter, _AngularBinSize__setter)
 Angle resolution of the accumulator in degrees.
 MinNumVotes = property(_MinNumVotes__getter, _MinNumVotes__setter)
 Minimum number of votes to qualify as a line.
 MinLineLength = property(_MinLineLength__getter, _MinLineLength__setter)
 Minimum length of a detected line segment in pixels.
 MaxLineGap = property(_MaxLineGap__getter, _MaxLineGap__setter)
 Maximum gap between two collinear segments to still merge them into one line.
 AngleThreshold = property(_AngleThreshold__getter, _AngleThreshold__setter)
 Maximum angular difference in degrees between two segments to consider them part of the same line.
 SegmentsBeforeMerging = property(_SegmentsBeforeMerging__getter, None)
 Returns the raw line segments that were merged to build the lines, as returned by the last call to eVision.ELineDetector.Detect.

Detailed Description

Detects straight lines in a BW8 image using Hough transform.

Remarks:

License(s): EasyImage

Constructor & Destructor Documentation

◆ __init__() [1/3]

None eVision.ELineDetector.__init__ ( self,
eVision.ELineDetector other )

Copy operator.

Parameters
otherAnother eVision.ELineDetector.

◆ __init__() [2/3]

None eVision.ELineDetector.__init__ ( self)

Constructs an eVision.ELineDetector.__init__ with all parameters explicitly specified.

◆ __init__() [3/3]

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

Copy operator.

Member Function Documentation

◆ Detect() [1/6]

list[eVision._eVision.ELine] eVision.ELineDetector.Detect ( self,
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]

list[eVision._eVision.ELine] eVision.ELineDetector.Detect ( self,
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]

list[eVision._eVision.ELine] eVision.ELineDetector.Detect ( self,
eVision.EROIBW8 image )

Detects straight lines in the given BW8 image.

Parameters
imageInput BW8 image.

◆ Detect() [4/6]

list[eVision._eVision.ELine] eVision.ELineDetector.Detect ( self,
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]

list[eVision._eVision.ELine] eVision.ELineDetector.Detect ( self,
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]

list[eVision._eVision.ELine] eVision.ELineDetector.Detect ( self,
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]

None eVision.ELineDetector.Load ( self,
eVision.ESerializer | None serializer )

Loads a detector configuration from a serializer.

Parameters
serializerSource serializer in read mode.

◆ Load() [2/2]

None eVision.ELineDetector.Load ( self,
str path )

Loads a detector configuration from a file.

Parameters
pathPath to the input file.

◆ Save() [1/2]

None eVision.ELineDetector.Save ( self,
eVision.ESerializer | None serializer )

Saves the detector configuration to a serializer.

Parameters
serializerTarget serializer in write mode.

◆ Save() [2/2]

None eVision.ELineDetector.Save ( self,
str path )

Saves the detector configuration to a file.

Parameters
pathPath to the output file.

◆ StopProcess()

None eVision.ELineDetector.StopProcess ( self)

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

eVision.ELineDetector.AngleThreshold = property(_AngleThreshold__getter, _AngleThreshold__setter)
static

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

Default is 35°.

◆ AngularBinSize

eVision.ELineDetector.AngularBinSize = property(_AngularBinSize__getter, _AngularBinSize__setter)
static

Angle resolution of the accumulator in degrees.

Default is 1.

◆ MaxLineGap

eVision.ELineDetector.MaxLineGap = property(_MaxLineGap__getter, _MaxLineGap__setter)
static

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

Default is 64.

◆ MinLineLength

eVision.ELineDetector.MinLineLength = property(_MinLineLength__getter, _MinLineLength__setter)
static

Minimum length of a detected line segment in pixels.

Shorter segments are discarded. Default is 164.

◆ MinNumVotes

eVision.ELineDetector.MinNumVotes = property(_MinNumVotes__getter, _MinNumVotes__setter)
static

Minimum number of votes to qualify as a line.

Default is 150.

◆ RadialBinSize

eVision.ELineDetector.RadialBinSize = property(_RadialBinSize__getter, _RadialBinSize__setter)
static

Distance resolution of the accumulator in pixels.

Default is 1.

◆ SegmentsBeforeMerging

eVision.ELineDetector.SegmentsBeforeMerging = property(_SegmentsBeforeMerging__getter, None)
static

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