KEYWORD PolygonFile BorderSize PointDistance MinimumPoints OuterObjects ExcludeEdgeObject DESCRIPTION 2DObjectFinder 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. The controls for selecting the input file and region to process are shared with many other Priism applications and are described in Region.hlp. 2DObjFinder accepts the command-line arguments described in Region.hlp. In addition, it has the following options: -border=n Sets the number of pixels, n, along each edge that 2DObjFinder excludes from segmentation. n must be a positive integer. By default, 2DObjFinder excludes a one pixel wide border around the edge of the image. -exclude_edge If specified, 2DObjFinder filters out any polygons that have a vertex within n+1 pixels of the sides of the image where n s the border size set with -border. -minpts=m Causes 2DObjFinder to filter out any polygons with less than m vertices. The filtering takes place before 2DObjFinder resamples the polygons to match the vertex spacing set with -spacing. By default, 2DObjFinder filters out polygons with less than three vertices. -poly=name Causes 2DObjFinder to generate a file named name to store the polygon results. If you do not use this option, 2DObjFinder does not save the polygons. -outer_only Causes 2DObjFinder to only generate the polygons that mark the outer boundaries of the objects and not the polygons that mark the edges of holes in the objects. -spacing=s Sets the distance between adjacent polygon vertices to be s pixels. By default, 2DObjFinder will generate polygon vertices spaced four pixels apart. 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 PolygonFile 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. BorderSize 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. PointDistance 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. MinimumPoints After polygons are generated, those with less than the number of vertices shown in the "min pts for one obj" field are eliminated. OuterObjects If the "outer objs only" toggle is on, polygons will not be generated to mark holes in a feature. ExcludeEdgeObject 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.