Up | LineFinder2 - 89 | LineEdgeFinder - 8 | LineEdgeCaliper - 16 | RadialArcFinder - 35 | LineFinder - 41 | LineEdgeFaults - 17 | WidthGauger - 65 | CircleGauger - 67 | SingleLineFinder - 128

Release Notes
 

  

 
LineFinder2 - 89

This tool finds multiple lines using a traceline. The trace comb is rectangular, with an optional perpendicular comb.

LineFinder2 is a very powerful tool requiring training and experience to take full advantage of all its features. To the right a perpendicular trace comb locates all edges simultaneously. The fitted points are shown with green circles and the trace lines in yellow. The bottom figure emphasizes the four found lines.


Setup

Reference - Reference system selection

Trace lines - describing the edge search area 

The ROI can be managed by the buttons

  • Paste - paste the ROI from the image to the scorpion clipboard
  • Copy - copy the ROI to the image from the scorpion clipboard

Point & Click Clipboard Support

The ROI can be defined by four points. The two first points define the length and direction of the trace comb. The other points define the width of the trace comb. With the rectangular ROI a line will define the center trace line - thus the length and the direction of the trace comb. One point will change the center point.

  • Center-x - center x of search comb
  • Center-y - center y of search comb
  • Width - width of search comb
  • Length - length of search comb
  • Angle - angle of search comb
  • Count - number of trace lines
  • Distance - distance betwees trace lines
  • Number of trace lines - Number of trace lines in search comb
  • Width - width of each trace line. See Edges and contours
  • Step (pixels) - step size between samples.  See Edges and contours
  • Use perpendicular trace lines - Create a second set of trace lines within the ROI, 90 degrees on the first. In effect, you will find all lines within the ROI.

Filter

  • Smooth base - 3 is normally a good value
  • Smooth counter - 1 default - given i pixels
    • The smoothing increasing with higher values
  • Differentiation
    • 0 - give threshold
    • 1 - 1. order differentiation - the derivative - default normally used
    • 2 - 2. order differentiation
  • Mode - Peaks are default. Threshold is only used when Differentiation is set to 0. An additional choice is Curve correlation - see below.

More information - see Filter parameters

Note : Combining 2. order differentiation and polarity are used to find the center position of light or dark stripes

Edge Detection

  • Polarity - Dark to light | Light to dark | All transitions
  • Percent threshold - dynamic threshold based on values from current traceline
  • Threshold - (if not percent) value lower values means more sensitivity
  • Min threshold - (if percent) minimum percent value used

Correlation search

To search for a known intensity curve rather than an edge, the correlation search may be helpful. You can select a step or a pulse curve form, or edit your own shape.

  • Step - a step. You can modify leading and trailing edges, and the slope length
  • Pulse - a pulse. You can modify leading and trailing edges, the slope length and the pulse width
  • Custom - create your own shape in the editor described below
  • Minimum Std for match - minimum Std (or variation) in image for a match to be considered
  • Use normalized correlation - normalise by removing mean and equalising Std in both image and curve

Shape editor

The curve shape is edited as a sequence of samples (space delimited). The defined center is where the edge point will be reported in the search.

Filter

Edge points to keep from each search line - One can filter on position and / or gradient

Position - All | First | Last

No - Number of points to keep pr line

Gradient - All | Largest | Smallest

No - Number of points to keep pr line

Note : The filters are very powerful - one can easily pick the first line by selecting Position = First and limit No to 1 or 2

The following constraints are used to reduce the number of lines reported as results. Best practice is to use the constraints to add properties of the inspected objects. This will make the processing go faster and to be more reliable.

Line Fit

  • Fit tolerance - points outside tolerance is not accepted
    • Tolerance given in pixels or reference coordinates
    • More information - Line fit.
  • Minimum number of points - minimum number of points fitted to circle to be accepted

Search parameters

  • Search risk (PPM) - 1 default - a lower value will perform more iterations
  • Max search time (sec) - limits the search in second - default 10

 


Advanced

Results

  • Sort results by - Gradient | Fitted Points | Line Lengths | Line Centers | Distance | Separation
  • Inv - will invert the sorting direction

Status

  • Activate Tool fails if no line is found
    • means that tool returns status = 3

Trace line samples dialog - a helper window to set trace line filter parameters and thresholds

  • Middle - show the middle traceline
  • Middle+edges - shows the first, middle and last traceline
  • Selection - show the selected tracelines
  • Line indices - traceline selection
    • example: 2,3,12-15
    • example: 1 3 5 7

Show trace line popup - activates a modeless traceline window

Example tracelines - Middle+edges is selected


Constraints

Classic

Max number of lines

Active - Enable line number filter

Max - max number of lines to report as a result

Line Length 

Active - Enable the filter to remove lines not meeting the length criteria

Min - minimum accepted length in reference coordinates

Max - maximum accepted length in reference coordinates

Gradient 

Active - Enable the filter to remove lines not meeting the gradient criteria

Min - minimum accepted gradient  in reference coordinates

Max - maximum accepted gradient in reference coordinates

Absolute value - check to ignore edge slope direction

Coarse line angle filter - use to reduce processing time - accuracy it not very good - set value with margins 

Active - Enable the filter to remove lines not meeting the angle criteria

Min - minimum accepted angle

Max - maximum accepted angle

Line angle  - with good accuracy 

Active - Enable the filter to remove lines not meeting the angle criteria

Min - minimum accepted angle

Max - maximum accepted angle

Line angle  - with good accuracy 

Active - Enable the filter to remove lines not meeting the angle criteria

Min - minimum accepted angle

Max - maximum accepted angle

Max Gap - missing points on a line to reject a line

Max - number of missing points accepted


Feature Classification

Classification constraints active - check to filter objects by the Classification limits (below)

Only objects in active classes - if checked, objects classified as belonging to a deactivated class are removed. If unchecked, objects in deactivated classes are retained, and not filtered by the classification limits.

Feature classes/references - define feature classes and add references

- Define a new feature class

- Delete feature class and all references

- Add a reference. The Add reference dialog box opens:

The defined classes are listed in the Class dropdown. Select a class to add references to. By clicking one of the numbered fields under Select, the numbered object is highlighted in the main image.

  • Click OK to add a single reference and close the add references box
  • Click Add to add a reference and keep the dialog open
  • Click Cancel or Close to close the dialog

Show all - overrides classification constraints set, displaying all objects.
Show classified - show only recognised (classified) objects
Show unclassified - show only unrecognised (unclassified) objects.

- Remove a selected reference

Class list popup menu

  • Add class - same as
  • Rename class - set new class name
  • Delete class - same as
  • Delete all classes - empty all lists
  • Copy all classes - copy all classes with references to the clipboard. Useful for moving definitions between tool instances
  • Paste (replace all classes) - replaces all class definitions with contents on the clipboard

Note that these operations cannot be undone.

Reference list popup menu

  • Add reference - same as
  • Rename reference - set new reference name
  • Edit reference - bring up a dialog for manual editing of the reference's details
  • Delete reference - same as
  • Delete all references - empty the reference list for the selected class

Note that these operations cannot be undone.

Classification limits - Used to filter objects when Classification constraints active is checked.

Max distance - max accepted distance limit to reference

Min separation (dB) - min accepted separation between best and second-best match

Weights - a number of object properties can be selected to be used in the classification. Each property has an associated function and a weight.

Check each property that is to be included

Automatic weight calculation - 

  • Checked: always keep the weights updated when references are added or deleted. Select the calculation function from the drop-down box [1/(max-min), 1/Std, 1/(3*Std) or 1).
  • Unchecked: weights can be set individually (below). Click the button to calculate all weights with the function selected in the drop-down box - useful as a starting point.

To set a relative weight manually you must uncheck Automatic weight calculation; weights can then be entered in the edit fields.

Functions and static values -

Pressing the button for a feature brings up this dialog:

Function - a normalising function can be applied to the property value prior to weighing. Reasonable defaults are set for new tools.

  • None
  • Square root - x^(1/2)
  • Cube root - x^(1/3)
  • Square - x^2
  • Cube - x^3

Static -  A static value can be used in the classification, overriding the individual references' feature values. Check the Static checkbox and enter the static value. The button is changed to as a reminder.

Include in description -

Classification results can be displayed next to the class name in the image. Useful for deciding the classification limit values

  • Index - object number
  • Name - class name, if any
  • Distance - classification distance
  • Separation - classification separation (dB)


Feature Statistics

This list displays statistics for the properties across all references.

 

Visualisation

BestLine The line deemed first first by the sorting specification
BestLineFat The same line, drawn thick
Description Classification result for valid line
Description (invalid) Classification result for invalid line
EdgePoints All edge points within the ROI
FittedPoints Edge points fitted to lines
Lines The lines found by the tool
LinesFat The same lines, drawn thick
ROI Region of interest
Trace lines Search lines used


Results

Number of lines The number of lines found
Tracelines Number of tracelines used
Perpendicular tracelines Number of tracelines used for search comb 2
Dominant class Feature classification: most encountered class
Dominant count Feature classification: number of occurences
Second dominant class Feature classification: second most encountered class
Second dominant count Feature classification: number of occurences
Dominant separation Feature classification: separation to next
Line[n].p.x Line n starting point
Line[n].p.y  
Line[n].v.x Line n vector
Line[n].v.y  
Line[n].q.x Line n end point
Line[n].q.x  
Line[n].Length Line n length
Line[n].Angle Line n angle
Center[n].x Center position of line n
Center[n].y  
Length[n] Length ov line n
Angle[n] Line angle, line n
Line angle[n] Directed line angle, line n
Gradient[n] The average gradient for the fitted tracelines
Line fit[n] The RMS value of the line-fit for a line 
Trace line span[n] Number of tracelines between first and last fitted point
Number of points[n] The number of fitted/accepted points on the line 
Widest gap[n] The widest gap (no fitted points) on the line
Classification[n] Feature classification: class
Distance[n] Feature classification: distance
Separation[n] Feature classification: separation

Note: <n> ranges from 1 to 15


ExecuteCmd support
- more information executeCmd

Command

Parameters

Return values

Comments

Set Object=ROI;Value=<point/line/polygon> ok,res Sets the tool's ROI. See Copy/paste ROIs for details.
Get Object=ROI ok,<line/polygon> Current ROI as rectangular, closed polygon

See also - Example 33 Changing the ROI of a tool


Scorpion Vision Version XII : Build 646 - Date: 20170225
Scorpion Vision Software® is a registered trademark of Tordivel AS.
Copyright © 2000 - 2017 Tordivel AS.