2D Object Finder works with a data set that has been preprocessed so that features are represented with pixels containing ones and non-features are zero. Threshold and FindBorder are two applications that may be used to do the preprocessing. The object finder creates a polygon to surround each feature in a 2D section. If the input data set is a window, the polygon outlines will be shown, and the polygons will be available for other polygon manipulation programs. The polygons may also be saved to a text file for later use.
For notes on how to approach the modeling process, see 3DModelStrategies.html.
The controls for selecting the input file and region to process are shared with many other Priism applications and are described elsewhere. The controls specific to 2D Object Finder are described below.
Region processing | Polygon file | Border size | Distance between points | Minimum points per object | Outer objects | Exclude edge objects | Command line
Threshold | FindBorder | EditPolygon | Volume Builder | Cut Mask | Priism
If you want 2DObjFinder to save the polygons to a file, enter the file name in the field next to the "Output .Pol File" button or press the "Output .Pol File" button to bring up a file browser to select the output file.
If the input file is an image window and you did not specify a polygon output file, you can use EditPolygon to save the polygons to a file without repeating the segmentation: run EditPolygon, enter the image window number that 2DObjFinder is using as its input in EditPolygon's "Image Window" field, and then press EditPolygon's "Save .POL File" button.
Points within a given distance, shown in the "border size" field, of an image edge are not included in features, i.e. it is as if they were set to zero in the input data set.
The "dist between pts" field determines how the polygons are compressed after they are generated. The compression is performed on polygons with ten or more vertices. A minimum side length, s, is chosen which is either the distance, d, show in the "dist between pts" field or, if the number of vertices divided by d is less than ten, d - j where j is the smallest integer such that the number of vertices divided by d - j is greater than or equal to ten. Starting from one of the vertices, the other vertices are considered in order and those that are less than the minimum side length from the previous vertex are eliminated.
The compression is performed after the criteria for the minimum number of vertices per polygon has been applied.
After polygons are generated, those with less than the number of vertices shown in the "min pts for one obj" field are eliminated.
If the "outer objs only" toggle is on, polygons will not be generated to mark holes in a feature.
If the "exclude edge objs" toggle is on, polygons with a vertex within one plus the border size pixels of the image edge will not be generated.
2DObjFinder accepts the command-line arguments described in Region.html. In addition, it has the following options:
-border=n
-exclude_edge
-minpts=m
-poly=name
-outer_only
-spacing=s
The following example segments the contents of window 2 and saves the outer boundary polygons in /var/tmp/2.pol:
2DObjFinder 2 -poly=/var/tmp/2.pol -outer_only