I re-added a straightening function the the calibrate_lens tool. Call it
with a -w 1 flag.

It assumes that all lines that are taller than they are wide are vertical.
Then it rotates these about the image centre such that the difference in
their max/min x-coordinates is minimised, and returns the angle of
rotation.

It's very crude and I haven't really tested. Take a look in Straighten.cpp
if you're interested.

Cheers,

Tim

On 22 December 2010 10:44, kfj <[email protected]> wrote:

>
>
> On 22 Dez., 04:16, Tom Sharpless <[email protected]> wrote:
>
> > Kay is right.  There is no way software, just looking at an image, can
> > tell which way is up.  That requires outside information, either from
> > a person, who can judge such things, or even better, from a sensor in
> > the camera.
>
> Maybe intelligent guesswork could get it right in a reasonable number
> of cases, though:
>
> - roll isn't excessive
> - pitch isn't either
> - there are vertical linear edges detectable in the image
>
> with these guesses assumed true (and specified as prerequisites for
> the method to work), try
>
> - any detectable linear edges roughly parallel to assumed vertical are
> candidates
> - if a good number of these candidates are near paralel or can be
> found to converge in a common point, they probably are vertical too
>
> The person who takes the photo doesn't just hold the camera out
> randomly, particularly if the intent is to later make it into a
> panorama, so the approach might work just like auto-levelling in hugin
> works well with it's statistical approach if the images are
> reasonable. Most photographers will make an effort to get their
> verticals right, so it would only be a matter of fine-tuning the
> result. If that fails or the prerequisites aren't met, it can still be
> done manually.
>
> Kay
>
> --
> You received this message because you are subscribed to the Google Groups
> "Hugin and other free panoramic software" group.
> A list of frequently asked questions is available at:
> http://wiki.panotools.org/Hugin_FAQ
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<hugin-ptx%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/hugin-ptx
>

-- 
You received this message because you are subscribed to the Google Groups 
"Hugin and other free panoramic software" group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/hugin-ptx

Reply via email to