Page 1 of 1

polar coordinates

Posted: Tue Jun 11, 2019 4:11 am
by krishnakumar77777
hi,
Can i find polar coordinates of object detected in image using cx and cy?

Re: polar coordinates

Posted: Tue Jun 11, 2019 9:48 am
by iabdalkader

Code: Select all

import math

def polar(cx, cy):
    return (math.sqrt(cx**2+ cy**2), math.atan(cy/cx) * 180 / math.pi)
print(polar(10, 10))