Up | ExternalLogic - 14 | ExternalScalar - 2 | ExternalText - 40 | ExternalPoint - 39 | ExternalLine - 38 | ExternalData - 66 | ExternalPolygon - 76 | ExternalPolygon2 - 156 | ExternalDictionary - 71 | LinearScaleTool - 4 | LogicPack - 18 | ToolBox - 92 | DataImport - 93 | ToolImport - 94 | Classifier - 86

Release Notes
 

  

 
ExternalPolygon - 76
ExternalPolygon is a data tool defining a series of polygons.

The polygons can be defined by clicking in the image. More on polygon operations.

        
The image shows the region of interest for a ColorMatcher driven from python - the path is defined in an ExternalPolygon.


Setup

  • Numbered list - ordered list of polygons
  • New - Make room for new polygon to be typed or pasted in
  • Delete - Delete selected polygon
  • Up - Move selected polygon up in list
  • Dpwn - Move selected polygon down in list
  • Paste new - Paste polygon from clipboard into new position at end of list
  • Highlight selection - Show polygon in red in main image
  • Copy - Copy selected polygon to clipboard
  • Paste - Paste polygon from clipboard into selected position

Further commands are available by right-clicking the numbered list.



Visualisation

None


Results

Count

Number of defined polygons

Polygon[1]-Polygon[16]

The first 16 defined polygons, as Python tuples

Note that only the first 16 polygons are reported as results - use executeCmd to access the remaining polygons.


Example: Using polygon results in scripts

  points = eval(GetValue('top_polygons.Polygon[1]')) # converts the result string to a python tuple


ExecuteCmd support
(see also executeCmd)

Command

Parameters

Return values

Comments

Set Object=ROI;Number=<n>;Value=<polygon> ok,None Set an existing polygon's value from StrVec format
Add Object=ROI;Value=<polygon> ok,None Add new polygon from StrVec format
Get Object=ROI;Number=<n> ok,<polygon> Retrieve polygon in StrVec format, open polygon
Get Object=Count ok,<count> Retrieve number of defined polygons
Get Object=Tuple;Number=<n> ok,<tuple> Retrieve polygon as a Python tuple
Delete Object=ROI;Number=<n> ok,None Delete numbered polygon
DeleteAll - ok,None Delete all polygons

 

 

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