RegionsOperatorsmRgnPolygonialArea Method
|
|
The area of the region boundary polygon
Namespace:
MediaCy.IQL.Operators
Assembly:
MediaCy.IQL.Operators (in MediaCy.IQL.Operators.dll) Version: 3.1.0.0
Syntax
RemarksThis is a boundary geometry based measurement, so it is not
dependent on pixel counts and is accurate for sub-pixel locations of region
boundaries. It is only valid for boundaries that do not cross themselves
(i.e., no figure-8's). For regions created by the McThreshold.Execute or
McFeatures.SetFromMask methods (features of Type mcftScanList), holes in the
blob are not significant for this measurement.
The area measured from the outline of region features of Type mcftScanList
depends on how the outline is placed around the scanlist blob. When the
OptionFlags mcofOutlinePixelTiles bit is set (thus forcing the outline to
follow the boundary pixels as if they were square tiles), the measured
mRgnPolygonialArea will equal the count of pixels, including holes, in the
blob times the area of one pixel. The mRgnArea measurement is a direct
count of pixels under and interior to the region boundary, excluding any
holes, so in this case these measurements will be equal if there are no
holes in the blob.
However, if the OptionFlags mcofOutlinePixelTiles bit is clear, or if the
region feature boundary is not derived from a feature of Type mcftScanList,
then the mRgnArea will almost always be larger than the area
reported by the mRgnPolygonialArea. This is because mRgnPolygonialArea is
computed from from the boundary outline and thus excludes any portion
of each border pixel "tile" that is not fully enclosed by the boundary
polygon.
For example for an 8 by 8 pixel rectangle of foreground pixels starting at
the orign, the McRegions feature created by McRegions.Threshold.Execute with
the OptionFlags mcofOutlinePixelTiles bit is clear will a box with its upper
left X,Y coordinate at 0,0 while its lower right coordinate will be at 7,7.
These coordinates fall on the centers of the border pixels. In this case
the mRgnArea measurement reports an area of 64 square pixel units (the count
of the 8 by 8 block), but the mRgnPolygonialArea reports an area of 49
square units (the area of the 7 by 7 border rectangle). With the
OptionFlags mcofOutlinePixelTiles bit set, both measurements report 64.
By default, the OptionFlags mcofOutlinePixelTiles bit is clear, so the
outline polygon vertices are placed on the centers of border pixels, not on
the "outer edge" of the border pixel, treated as a tile. The logic behind
this is that pixel intensities are actually seen as an array of point
values, not "tiles". And the best quess as to the location of each of these
point values is in the center of the pixel "tile", not on one of the tile's
borders.
See Also