Click or drag to resize

RegionsOperatorsmRgnPerimeter Method

Perimeter of the region's boundary.

Namespace:  MediaCy.IQL.Operators
Assembly:  MediaCy.IQL.Operators (in MediaCy.IQL.Operators.dll) Version: 3.1.0.0
Syntax
VB
<ExtensionAttribute>
Public Shared Function mRgnPerimeter ( 
	regions As McRegions
) As McMeasure

Parameters

regions
Type: MediaCy.IQL.FeaturesMcRegions

Return Value

Type: McMeasure

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type McRegions. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
This is a boundary geometry based measurement, so it is independent of pixel counts and is accurate for sub-pixel locations of region boundaries. It is usually more accurate than the boundary pixel count-based estimate of perimeter that is available as mRgnPerimeter2. The perimeter of the raw outline of region features of Type mcftScanList (ones created by the McThreshold.Execute method or McFeatures.SetFromMask methods) is usually larger than desired. This is especially true when the OptionFlags mcofOutlinePixelTiles bit is set (this forces the outline to follow the boundary pixels as if they were square tiles), in which case each diagonal pixel transition contributes two units to the perimeter when one would usually want it to contribute only the square root of two. But perimeter overestimation is also a problem even if the OptionFlags mcofOutlinePixelTiles bit is clear, so that blob outlines are placed on border pixel centers. No error is introduced for horizontal, vertical or 45 degree runs, but runs at other angles introduce a small error. For example, a run at 25 degrees of two pixels horizontally followed by one pixel vertically should contribute sqrt(5) (2.24) to the perimeter but it actually contributes one plus sqrt(2) (2.41). So for region features of Type mcftScanList only, a weak filter is run on the boundary outline for vertices that are within one pixel of each other. The effect is to make the perimeter smaller than that computed from the raw outline and to make it more constant as the underlying scan list is rotated.
See Also