Up | ImageResampler - 70 | Blob4 - 87 | TemplateFinder3 - 63 | Blob3 - 60 | MultiBlob - 47 | TemplateFinder2 - 44 | TextureMatcher - 53 | PolyLineGapFinder - 49 | ColorSegmentor - 57 | PolygonMatch - 62 | ColorAnalyzer - 80 | PolyLineEdgeFaults2 - 85 | PolarUnwrap - 113 | SurfaceAnalyzer - 91 | ImageMixer - 147 | AreaFilter - 158

Release Notes
 

  

 
PolyLineGapFinder - 49

This tool finds gaps within specified paths in an image.

Based on a geometry description for a set of paths, the PolyLineGapFinder tool detects and counts gaps along the paths.

The following results are found:

  • Number of gaps found

  • Positions of the gaps (gap centers)

  • The longest gap

 

The tool works with subpixel resoultion when calibrated with a high precision grid - more information Calibrator

An interactive Polygon Wizard improves the speed and the accuracy of polygon path definitions.

For short gaps, a two step gap validation improves the accuracy of locating gaps.

  • Step 1 : look for short gaps along the paths
  • Step 2 : validate size and span of gap using a dynamic blob-analysis

The tool does not deliver an output reference coordinate system.


Setup

Reference - Reference system selection

Line definition file - The paths to be searched are initially read from a text file (see the StrVec format). The name of that file is also stored, for possible future reload. The path information, however, is stored directly in the system, without need for the external file.
You can browse for or manually edit the filename; by clicking "Load", the file is read and its contents stored internally. 

  • Always read file at startup (overwrite SPB) - With this selection, the file is always loaded at startup.

Position

  • Offset in X-direction - added to search positions
  • Offset in Y-direction - added to search positions

Long gaps

  • Search for long gaps - enable/disable this algorithm. A long gap is defined as the longest stretch between edges of opposite polarity (light-do-dark and dark-to-light or vice versa).

Search

  • Trace step (pixels) - Number of pixels between each sample along the lines - normally 1 - given in pixels
  • Line width (pixels) - Number of pixels to each side of the central to include in an averaging operation - 0 - trace line is not averaged - a higher value will average N pixels perpendicular to the trace comb
  • Smooth base - Averaging filter length. 3 is normally a good value
  • Smooth counter - Count of repeated averaging filter operations. 1 default
    • The smoothing increasing with higher values
  • Threshold - Intensity difference to signify a gap. The threshold or sensitivity of the gap - a lower value increases the sensitivity.
  • Polarity - All gaps (dark and bright) | Positive (bright gaps) | Negative (dark gaps). Search for "dark", "bright" or all gaps

Search line samples dialog

Show intensity variations along one or more search lines. Useful for setting search parameters.

  • Line indices - traceline selection
    • example: 2,3,12-15
    • example: 1 3 5 7
  • Show short search - use the short search filter settings
  • Show search line popup - display graphs


Advanced

Search for short gaps

Shorter gaps are define to locate small gaps. Blob Search is added to verify that contrast reduction across the complete gap.

The example shows a rejected short-circuit candidate and one broken-circuit and one rejected broken circuit. Candidates are defined to comply with the Short Gap Definition.

Search

  • Trace step (pixels) - Number of pixels between each sample along the lines - normally 1 - given in pixels
  • Line width (pixels) - Number of pixels to each side of the central to include in an averaging operation - 0 - trace line is not averaged - a higher value will average N pixels perpendicular to the trace comb
  • Smooth base - Averaging filter length. 3 is normally a good value
  • Smooth counter - Count of repeated averaging filter operations. 1 default
    • The smoothing increasing with higher values
  • Threshold - Intensity difference to signify a gap. The threshold or sensitivity of the gap - a lower value increases the sensitivity.
  • Polarity - All gaps (dark and bright) | Positive (bright gaps) | Negative (dark gaps). Search for "dark", "bright" or all gaps
  • Max length (pixels) - ignore gaps exceeding this length

Blob analysis

  • Blob search width - parallel search lines are positioned 1 pixel apart along a candidate gap, defining the blob search area.
  • Search for blobs Brighter than | Darker than
    • Threshold
  • Threshold calculated as Percent of span | Percentile
    • this is a dynamic threshold independant of the absolute intensity of the gap
  • Min blob area given in square pixels
    • 2 x 2 pixels are 4 square pixels
  • Allow (and ignore) smaller blobs
  • Blobs must span entire resample width

Constraints

  • Min blob count
  • Max blob count


Search lines

Search Area - the tool's region of interest

  • Vector - ordered list of polygons. Each polygon can be made active/inactive by clicking the checkbox in front of the number
  • Contents - the points of the selected polygon
  • New - add polygon
  • Delete - remove selected polygon
  • Up - moves polygon up in list
  • Down - moved polygon down in list
  • Paste new - creates a new polygon, pastes the polygon from the clipboard and presses apply  - this is the quickest way to create many polygons
  • Highlight selection - highlights the selected polygon in the image
    • used to identify a polygon in the image
  • Copy - copies the selected polygon to the clipboard
  • Paste - pastes the clipboard to the selected polygon - will overwrite an existing polygon

Vector mouse menu - activate by right mouse clicking in the Vector list

  • New - creates a new vector
  • Delete - deletes the selected vector
  • Custom... - open dialog to define settings for a single polygon
  • Set defaults - remove custom settings for a polygon and revert to defaults
  • Paste new - paste clipboard as new polygon
  • Up - moves polygon up in list
  • Down - moved polygon down in list
  • Grid... - activate dialog for defining polygon grid
  • Delete all - removes all polygons from list
  • Delete empty vectors - remove all empty polygons

Autofit

  • Autofit settings - wizard traceline properties (shown or hidden by the Show settings checkbox)
  • Autofit polygons - interactive help when defining paths to search for gaps

The wizard places the path in the middle of a light or dark band.

  • Visualize - The wizard tracelines and edge points are shown in the image window.
  • Show settings - show/hide the wizard traceline properties (Autofit settings)

Polygon properties dialog - vector list Custom choice:

Each polygon can have its own settings, overriding the default values. The custom settings include tracelines and edge detection.


Visualisation

BlobPolygon
Gap Line gaps
GapCenter
InsideBlob
OutsideBlob
Path Search lines
PathNumber
PathNumberOnGap
ShortGap
ShortGapCenter
TraceLines

Results

Number of gaps

Number of gaps found in image

Longest gap

The longest gap

Line index longest gap

 


ExecuteCmd support
(see also executeCmd)

Command

Parameters

Return values

Comments

Set Object=ROI;Value=<polygon> ok,None Sets the first ROI polygon. See Copy/paste ROIs for details.
Set Object=ROI;Number=<number>;
Value=<polygon>
ok,None Sets the numbered ROI polygon. See Copy/paste ROIs for details.
Add Object=ROI;Value=<polygon> ok,None Adds ROI polygon to the end of the list. See Copy/paste ROIs for details.
Get Object=ROI;Number=<number> ok,<polygon> Gets numbered polygon, as Scorpion polygon (StrArr format).
Get Object=Tuple;Number=<number> ok,<tuple> Gets numbered polygon, as Python tuple
Clear Object=ROI;Number=<number> ok,None Clears numbered polygon (makes empty)
DeleteAll - ok,None Deletes all polygons


Keyboard shortcuts
- More information

Shortcut

Command

Comments

Ctrl-Z Set ROI Sets the selected polygon to points marked in the image. If only a single point is marked, the polygon is moved, centered around the point.
If the tool dialog is not open, the first polygon is set.
Ctrl-1 - Ctrl-0 Set polygon 0-10 Sets the numbered polygon to points marked in the image. If only a single point is marked, the polygon is moved, centered around the point. If a new polygon is defined this way, any missing polygons in between are set as empty.
Ctrl-Shift-1 - Ctrl-Shift-0 Clear polygon 0-10 Clears the numbered polygon (sets empty).
Ctrl-Shift-W Autofit wizard Manual activation of the Autofit wizard


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