CCentroid:X CCentroid:GetSample

CCentroid:Y


The Y method returns the centroid y position obtained by the Calc method.

Syntax

nY = CCentroid:Y()

    nY is the centroid pixel coordinate for the y axis, measured in pixel coordinates.

Example

 

C = CCentroid:new()

-- create a new CCentroid object

C:Calc( 100, 200 )

-- calculate the centroid near pixel coordinate 100,200

Printf("Y=%.3lf", C:Y() )

-- result: Y = 199.217

Related Topics

CCentroid, X, Calc, Image Coordinate System, Subpixel Coordinate Definition