PanoTools NG:
Re: equirectangular projection
Erik Krause 2009-May-11 20:33:02
Santiago wrote:
> I have a raw 8000x4000 photo, and I know the azimuth and height of the
> sun during the day, and during the year, all I need is a formula to
> convert my solar height (degrees) to equirectangular height in pixels.
It is very easy, since equirectangular coordinates map directly to
height and azimuth (given the horizon is level).
In your example given the center of the equirect points south the left
and right edge are north, 2000 pixels from left is east, 4000 pixels
from left is south and 6000 pixel from left is west.
A sun height of 0° is on the horizon and hence in the middle of the
panorama, 45° height is half way between the horizon and the upper edge.
If in your sun coords south is 180° and you use standard image
coordinate system with (0,0) in the upper left corner the formula for
(X,Y) equirect coordinates, (w,h) equirect dimensions, (azimuth,height)
sun coordinates is:
X = azimuth/360° * w
Y = (height-90°)/180° * h
best regards
--
Erik Krause
http://www.erik-krause.de
------------------------------------
--
<*> Wiki: http://wiki.panotools.org
<*> User Guidelines: http://wiki.panotools.org/User_Guidelines
<*> Nabble (Web) http://www.nabble.com/PanoToolsNG-f15658.html
<*> NG Member Map http://www.panomaps.com/ng
<*> Moderators/List Admins: #removed#
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/PanoToolsNG/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/PanoToolsNG/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:#removed#
mailto:#removed#
<*> To unsubscribe from this group, send an email to:
#removed#
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/