Reputation: 11
I am looking to plot out points on a 2d spherical image from a GoPro Max given an Altitude° and an Azimuth°.
Here's what you can assume:
Here's what I know:
I hope that this will give you a better idea of what I'm trying to do here.
Put simply, I'm imagining a method something like:
ConvertCoords(Azimuth°, Altitude°){
...
return (x,y)
}
Is this possible? I will probably implement this using Python but I'm open to suggestions. Any sort of information to point me in the right direction is greatly appreciated!
Edit: I should mention that from my research I believe the GoPro Max uses an equirectangular projection. I was able to overlay that image I attached on one of the 360 photos and plot out some data manually which seemed to come out correct.
Upvotes: 1
Views: 1275
Reputation: 54698
With an equirectangular projection, the mapping is direct and linear.
def convertCoords( azimuth, altitude ):
# Assumptions:
# - Both values are in radians
# - South is an azimuth of 0, negative to the left, range -pi to +pi
# - Altitude range is -pi/2 to +pi/2, negative down
x = 2880 + (azimuth * 2880 / math.pi)
y = 1440 - (altitude * 2880 / math.pi)
return x,y
If you'd rather use degrees, change "math.pi" to "180".
Upvotes: 1