CImage:Angle
The Angle method calculates the angle in degrees between a line formed by 2 image points measured in pixel coordinates. To measure an angle in world coordinates, use the AngleWcs method.
nAngle = CImage:Angle( x1, y1, x2, y2)
On success, this method returns nAngle as a number.
On failure, this method returns the default value 0.
The Angle method returns an angle in degrees. The angle is measured positive with increasing x value and increasing y value. For a discussion of angle and its measurement in different image types, see Angle Measurement Definition.
Assume an image is displayed and attached to a CImageView named V. The following script fragment measures the angle formed by two points (x1,y1) and (x2,y2) when the coordinates are in pixel units:
|
-- load the image from a |
|
-- point 1 |
|
-- point 2 |
|
-- make the measurement |