On December 22, 2010 04:55:05 am Tim Nugent wrote:
> It assumes that all lines that are taller than they are wide are vertical.

sorry for getting late on this very interesting discussion.  As Tom said, 
without being told what is vertical (by mean of good level sensors), it is 
impossible to know with certainty what is really vertical.

However some assumption / logic can be used (and may be helpful also when 
improved with sensor input).

First: some images won't have/detect lines at all, so 100% success is never 
possible without a sensor (and even with sensor, there are tolerances and 
such).

Assumption: most users will try to hold their camera somehow level.  Lines 
that are parallel to any edge of the camera are more likely to be vertical 
than lines that are not.

Assumption: vertical lines are mostly man-made (exception:  pine trees, but 
they present other issues / challenges too), they come in group and there are 
usually more of them than of any other line kind  (exception:  modern building 
fassades).  Identify groups of parallel lines.  The more lines are parallel, 
the more likely they are vertical.

With so many heuristics it is possible to come to a potable result in a large 
number of case.  When there are ambiguous cases, present the user with the 2-3 
possible choices and let them visually inspect / decide.  It will still be 
helpful for precision straightening, better than manual rotation.

Yuv

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to