PanoTools mailing list archive

Mailinglist:PanoTools NG
Sender:Steinar Midtskogen steinar@...
Date/Time:2014-Dec-12 20:39:58
Subject:Re: Panotools rounding bug?

Thread:


PanoTools NG: Re: Panotools rounding bug? Steinar Midtskogen steinar@... 2014-Dec-12 20:39:58
"Bruno Postle #removed# [PanoToolsNG]"
<#removed#> writes:

> pano_trafo is using pixel coordinates, starting at top left of the
> image. So a negative value doesn't really mean anything (especially
> for an equirectangular image). To translate these pixel coordinates to
> altitude-azimuth you need to shift them by 90 and 180 pixels.

Actually, alt=90-y assuming a 360x180 degree equirectangular image where
alt=90 is zenith and alt=-90 is nadir.

I would expect negative y to mean that I would be on the (x + 180) % 360
meridian, but the flipover should happen at y=0, not -0.5.

I've been using panotools to track meteors, like this:

 http://norskmeteornettverk.no/bilder/2014/meteor-20141208.jpg

The grid was made using pano_trafo, feeding in az, alt points and
getting out points for lines in the photo.  However, when I did the same
thing for a camera pointing upwards, I got this:

 http://norskmeteornettverk.no/bilder/2014/meteor-20141209-grid.jpg

Note that the zenith point is a circle 1 degree wide, not a point!
That's how I discovered this oddity.


A minimal .pto file to reproduce this issue is:

$ cat x.pto
p f2 w360 h180 v360
i w1000 h1000 f20 p90

$ echo 0 0 90 0 180 0 270 0 | pano_trafo -r x.pto 0 2> /dev/null
499.412993 489.530032
489.530032 499.587007
499.587007 509.469968
509.469968 499.412993

The expected result should be 500 500 for all four points.  But I get
points circled around 499.5 499.5 instead.

$ echo 0 -0.5 90 -0.5 180 -0.5 270 -0.5 | pano_trafo -r x.pto 0 2> /dev/null
499.500000 499.500000
499.500000 499.500000
499.500000 499.500000
499.500000 499.500000

If I rescale in the .pto file:
p f2 w36000 h18000 v360
i w1000 h1000 f20 p90

$ echo 0 0 9000 0 18000 0 27000 0 | pano_trafo -r x.pto 0 2> /dev/null
499.499991 499.400296
499.498425 499.400308
499.496860 499.400345
499.495295 499.400407

Still a circle around 499.5 499.5, but not the same as above, much
tighter instead!

pano_trafo version 2013.0.0.4692917e7a55

I might not have the most recent version.  Can anyone with something
more recent check if the results are the same for something more recent?

-- 
Steinar


------------------------------------
Posted by: Steinar Midtskogen <#removed#>
------------------------------------

-- 
<*> Wiki: http://wiki.panotools.org
<*> User Guidelines: http://wiki.panotools.org/User_Guidelines
<*> Nabble (Web) http://panotoolsng.586017.n4.nabble.com/
<*> 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:
    #removed# 
    #removed#

<*> To unsubscribe from this group, send an email to:
    #removed#

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/


Next thread:

Previous thread:

back to search page