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 )
where
x1,y1, x2, y2 are pixel coordinate values and may be expressed as numbers or strings.
nAngle is the returned angle, measured in degrees.
bSuccess is the returned success code. On success it is true, otherwise false.
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 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 |