To compute the angle between an object and its parent process object, the arctan2 function would be great in the eCognition Features Calculator.

Arctan2 returns the arc tangent of the two numbers x and y (i.e. object coordinates). It is similar to calculating the arc tangent of y / x, except that the signs of both arguments are used to determine the quadrant of the result.

arctan2(y,x) =

  • If x=0 and y<0, the angle is 270° (3*π/2 radians)
  • If x=0 and y>0, the angle is 90° (π/2 radians)
  • If y=0 and x<0, the angle is 180° (π radians)
  • If y=0 and x>0, the angle is 360° or 0° (2*π or 0 radians)
With the this potential string in the feature calculator, users could compute the angle between objects then easily:
arctan2 ([Y Center diff. PPO (1)], [X Center diff. PPO (1)])

1 comment

  • Keith Peterson

    We will try and get this added for your Christian! Thanks for the recommendation.

Recent Discussions

Need more help?

Enter Knowledge Base Contact Support