Perspective correction woes....

141 views
Skip to first unread message

Bob Mahar

unread,
Oct 8, 2013, 5:31:40 PM10/8/13
to hugi...@googlegroups.com
I'm using a somewhat older Hugin release ( 2012.0.0.a94faa15c927 on openSUSE 12.1 ) and will try to see if a current version resolves this issue. 

 But I am shooting stained glass in a church.  Because of some huge light fixtures, I am having to shoot from off center, so you have perspective in both axes.  There are 14 sets of these panels, about 1 x 8 meters, each about 3 meters up.    And I am in the same relative position when I'm shooting, about 10 degrees to the left or right to avoid the light fixtures..  

The first couple batches came out great, hugin detects the PoV, this shows up properly in the preview applet, and applies perspective correction - fantastic!   Auto-magical!   The last couple ( identical setup photographically ) it seems to shear the image making horizontal -OR- vertical lines plumb, but not correcting both simultaneously.  

I have gone into all of the 26 images and made sure there are vertical / horizontal contol lines that make sense.   I do note that many of them show HUGE discrepancies ( hundreds of pixels ) - I'm not sure if that is normal, or a symptom.

I understand the requirements in terms of the input images, and use Hugin a lot, so while not an expert, I've used it enough to know something odd is happening.   I'm at a loss.  Here is the rest of the project:

http://maps.muhlenberg.edu/gallery/

The panels I'm struggling with are similar to the last one in the series ( scroll the thumbnails all the way over, the final tall panel )   This was shot in the same manner, and came out perfectly, pretty much as seen.  about 10 degrees to the left or right.  The current batch have horizontal line plumbed to the horizon, and vertical lines are sheared or rotated so the image is on a 20 degree angle.

I guess my ultimate question: how do I troubleshoot this?   Where do I look for problems.

Thanks!

-- Bob






 

Terry Duell

unread,
Oct 8, 2013, 6:58:34 PM10/8/13
to hugi...@googlegroups.com
Hello Bob,

On Wed, 09 Oct 2013 08:31:40 +1100, Bob Mahar <muhl...@gmail.com> wrote:

[snip]

> I guess my ultimate question: how do I troubleshoot this? Where do I
> look for problems.

Not sure.
Have all the subjects been a single image that you correct for
perspective, or have all/some been overlapping images?

Cheers,
--
Regards,
Terry Duell

Bob Mahar

unread,
Oct 8, 2013, 7:42:21 PM10/8/13
to hugi...@googlegroups.com
Hi,

Sorry not to mention the input images. Its about 26 overlapping 16MP images, no HDR or stacking involved. This was shot with a decent flat field 300mm prime, so they have very little distortion for Hug in to undo. For the overlapping control points, the fit is great, about 1 pixel delta. Seams look great on the rendered image. About 30% overlap between shots. Very few vertical / horizontal lines were detected. I tried to improve matters by adding a 2 or 3 per image. On checking each of them, they all look perfect. This had the effect of changing the shearing from vertical to horizontal.

-- Bob

Terry Duell

unread,
Oct 8, 2013, 8:00:20 PM10/8/13
to hugi...@googlegroups.com
Hello Bob,
OK. If your input images and process is pretty much the same as for your
other successful projects, it is difficult to guess at what might be going
wrong.
Have you tried correcting/stitching a few at a time, save in
equirectangular, then stitch the resulting tiles?
It is a more drawn out process, but may also allow you to see where the
problem is occurring.
You could also get all your control points, added horiz and verticals, and
then try adding one image at a time to the optimization, to see if that
isolates the problem.

Bob Mahar

unread,
Oct 8, 2013, 8:53:36 PM10/8/13
to hugi...@googlegroups.com
Divide and conquer...   I'll give it a try.

-- Bob

Terry Duell

unread,
Oct 8, 2013, 8:57:19 PM10/8/13
to hugi...@googlegroups.com
Hello Bob,

On Wed, 09 Oct 2013 11:53:36 +1100, Bob Mahar <muhl...@gmail.com> wrote:

> Divide and conquer... I'll give it a try.
>
> -- Bob
>

Good. Let's know how you get on.

Bob Mahar

unread,
Oct 8, 2013, 9:26:20 PM10/8/13
to hugi...@googlegroups.com
Yeah, the "divide and conquer" approach worked for me as well as for Napoleon.  

Picking a cluster of 4-6 adjacent shots gives similar results, and stitching those intermediate shots same again.    It just seems to be completely ignoring the horizontal control points.   There must be some threshold I am violating angle wise.  I was able to use Gimp to modify the perspective after the fact, seems to produce nearly identical output.   Given I can fix in post, I give up... ;-)    If I find some magic that fixes this, I'll post it.

-- Bob

Terry Duell

unread,
Oct 8, 2013, 10:13:39 PM10/8/13
to hugi...@googlegroups.com
Hello Bob,
OK. Sorry it isn't working out correctly in Hugin.
I'll try some experiments to see if I can see something similar, but it
may be a wild goose chase.

paul womack

unread,
Oct 9, 2013, 4:05:37 AM10/9/13
to hugi...@googlegroups.com
Bob Mahar wrote:
> Yeah, the "divide and conquer" approach worked for me as well as for Napoleon.
>
> Picking a cluster of 4-6 adjacent shots gives similar results, and stitching those intermediate shots same again. It just seems to be completely ignoring the horizontal control points. There must be some threshold I am violating angle wise. I was able to use Gimp to modify the perspective after the fact, seems to produce nearly identical output. Given I can fix in post, I give up... ;-) If I find some magic that fixes this, I'll post it.

Question - do "line control points" outvote normal countrol points?

Because if they only get equal weight a large number of "normal" control
points will render a few "line control points" negligable,
democratically speaking?

BugBear

Felix Hagemann

unread,
Oct 9, 2013, 12:45:08 PM10/9/13
to hugi...@googlegroups.com


Bob Mahar:

> Picking a cluster of 4-6 adjacent shots gives similar results, and stitching those intermediate shots same again.    It just seems to be completely ignoring the horizontal control points.   There must be some threshold I am violating angle wise.  I was able to use Gimp to modify the perspective after the fact, seems to produce nearly identical output.   Given I can fix in post, I give up... ;-)    If I find some magic that fixes this, I'll post it.

Just a wild guess: What is the output projection you are using? Horizontal lines only do are "real" horizontal lines in rectilinear protection.

Felix

Bob Mahar

unread,
Oct 11, 2013, 11:30:51 AM10/11/13
to hugi...@googlegroups.com


On Wednesday, October 9, 2013 12:45:08 PM UTC-4, Felix Hagemann wrote:


Just a wild guess: What is the output projection you are using? Horizontal lines only do are "real" horizontal lines in rectilinear protection.

rectilinear.   I've not found any solution as yet.  Its east to fix in post, though you deal with some residual distortion. You can re-process the resulting single image, as mentioned, and it does fix it.   But for multi-shot panoramas, it sees as if there is a critical angle past which it will not recognize the horizontal lines and adding them manually does not seem to correct the situation.   I re-processed some of the older ones I did with less acute perspective skew, and they did result in the perspective being corrected.   I'd just like to find if there is a setting to adjust that threshold.   I guess I could pre-rotate the image.

-- Bob

panostar

unread,
Oct 11, 2013, 2:59:01 PM10/11/13
to hugi...@googlegroups.com
Bob, Can you supply a smallish version of the straight stitched image without any perspective correction or cropping, together with the horizontal fov specified when generating the output image?  You should only need a total of 2 horizontal and 2 vertical line control points to correct it.

John

panostar

unread,
Oct 11, 2013, 3:08:06 PM10/11/13
to hugi...@googlegroups.com
Bob, An afterthought:  it's rather basic, but you are optimizing y,p,r on all images aren't you?  Unless the panorama can slide sideways, the horizontal points won't be effective.

John
Reply all
Reply to author
Forward
0 new messages