CCentroid Class
The CCentroid class encapsulates functionality for computing accurate centroid coordinates in an image. The centroid position is a refined coordinate based upon higher order moments of the pixel value distribution. This class provides methods for calculating the centroid position and for working with control parameters. The pixel coordinates may be converted to world coordinates using one of the CImage class methods such as XyToWcs.
Construction |
Object = new_centroid() Object = CCentroid:new() |
Destruction |
Object:delete() |
The properties in the table below may be accessed directly. However, you can also access them using the provided Get... and Set... methods.
radiusX |
The pixel radius for computing the centroid position in the x direction. |
radiusY |
The pixel radius for computing the centroid position in the y direction. |
trackX |
The pixel radius for tracking the peak or valley in the x direction from the initial position to the centroid position. |
trackY |
The pixel radius for tracking the peak or valley in the y direction from the initial position to the centroid position. |
bPositive |
True if centroids are computed for peaks, or false if computed for valleys. |
This function is normally used to create a new CCentroid object as an alternative to the class-based new method.
Creates a new instance of a CCentroid object. |
Creates a new instance of a CCentroid object. Various constructors are available |
|
Deletes the instance of the CCentroid object. |
Returns a boolean flag for the direction used to compute centroid positions. The value true means that centroid are computed for peaks, rather than for valleys. |
|
Returns the centroid sample radius in x and y directions. |
|
Sets the centroid tracking radius in x and y directions. |
|
Sets the centroid calculation to use peaks (true) or valleys (false). |
|
Sets the sample radius in x and y directions to the specified number of pixels. |
|
Sets the tracking radius in x and y directions to the specified number of pixels. |
Calculates the centroid position for the image near starting coordinate x,y. |
|
Returns the computed x coordinate of the centroid position. |
|
Returns the computed y coordinate of the centroid position. |
Script Classes,, Image Coordinate System, Subpixel Coordinate Definition
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.