polar coordinates

General discussion about topics related to OpenMV.
krishnakumar77777
Posts: 39
Joined: Mon Oct 15, 2018 6:34 am

polar coordinates

Postby krishnakumar77777 » Tue Jun 11, 2019 4:11 am

hi,
Can i find polar coordinates of object detected in image using cx and cy?
User avatar
iabdalkader
Posts: 840
Joined: Sun May 24, 2015 3:53 pm

Re: polar coordinates

Postby iabdalkader » Tue Jun 11, 2019 9:48 am

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))

Return to “General Topics”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests