I can't stitch a simple 2 image panorama!

Discussion forum for techniques and issues relating to the creation of panoramic and/or "mosaic" images

Moderator: spamkiller

Post Reply
stic
Posts: 5
Joined: Fri Jun 21, 2013 8:21 am

I can't stitch a simple 2 image panorama!

Post by stic » Fri Jun 21, 2013 8:49 am

Hi,

I'm trying to stitch the 2 images below, but I couldn't get them to align properly, and the stitching problem can be seen very clearly even after blending. I have tried various stuff, but much to my frustration, I couldn't get it to work.

https://docs.google.com/file/d/0B_5M4dZ ... sp=sharing
https://docs.google.com/file/d/0B_5M4dZ ... sp=sharing

Quick summary of settings I used (Using version 6.1 of PTASSEMBLER):
  • Mercator projection
  • FOV Focal Length = 18 x 1.6
  • I manually placed 12 t0 control points along the left edge of the 2nd image.
  • Used Auto-Optimization
  • Output blended, single layer TIFF
I tried PTGUI, the stitching worked without problems. I believe I have done something wrong. Please help, thanks!

maxlyons
Posts: 3649
Joined: Fri Jun 20, 2003 8:55 pm
Location: USA
Contact:

Re: I can't stitch a simple 2 image panorama!

Post by maxlyons » Fri Jun 21, 2013 9:27 am

stic wrote: I'm trying to stitch the 2 images below, but I couldn't get them to align properly, and the stitching problem can be seen very clearly even after blending. I have tried various stuff, but much to my frustration, I couldn't get it to work.
I loaded your two images into PTAssembler, hit the "Auto-Create" button on PTAssembler's Step 1 screen, and generated a reasonable looking preview on the first attempt (screenshot below).
settings I used...
[*]FOV Focal Length = 18 x 1.6
The EXIF data in your images say that the focal length was 20mm, and PTAssembler was able to calculate from the EXIF data that the correct multiplier for your camera is 1.59. Given all this (and the fact that your images are in portrait orientation), PTAssembler was also able to calculate the horizontal field of view to be 41.35 degrees. I'm not sure if you used 18 (or 18x1.6=28.8) as the FOV or the focal length, but in general, whenever PTAssembler can calculate this information for itself (as it can with your images because they contain EXIF data), it is probably best to let PTAssembler do so rather than entering it manually.
I manually placed 12 t0 control points along the left edge of the 2nd image.
Manual placement is fine, but generally not necessary. PTAssembler comes with an automated control point picker (PTAPicker) and can also use a selection of other programs to do this. Also, if you are manually placing control points you'll need to add them to both the left edge of the 2nd image, and the right edge of the 1st image.

If you are still having problems, posting the PTAssembler project file would be useful.

Hope this helps,

Max

Image

stic
Posts: 5
Joined: Fri Jun 21, 2013 8:21 am

Re: I can't stitch a simple 2 image panorama!

Post by stic » Fri Jun 21, 2013 10:31 pm

Dear Max,

I tried out Auto-Create. The results are better with lesser misaligned areas. The improved results could have been due to the auto computed FOV; I could have used a less accurate setting. However, there is still a misalignment at the bottom of the image as shown below. Oh yes, btw, the images are taken with a panohead.

Image

The ptp file is provided below just in case you need it:
https://docs.google.com/file/d/0B_5M4dZ ... sp=sharing

Actually the misalignment problems that I faced are not restricted to this particular image, but this one is quite visible. I think I have consistently used a wrong set of parameters (FOV being one of them)!

One more question: How can I maximize the size of the preview image within the preview window? As you can see below, most of the preview window is empty space:
Image

maxlyons
Posts: 3649
Joined: Fri Jun 20, 2003 8:55 pm
Location: USA
Contact:

Re: I can't stitch a simple 2 image panorama!

Post by maxlyons » Sat Jun 22, 2013 11:59 am

stic wrote:there is still a misalignment at the bottom of the image
I can't tell if the screenshot you posted is of PTAssembler's preview or a final blended image. I suspect that it is probably a screenshot of the preview, in which case I wouldn't worry too much about that misalignment...the preview doesn't do any blending (in order to speed up the preview), so minor misalignments between the images are often visible. In practice, these types of misalignments are usually removed when a final blended panorama is created due to the "intelligent" blending algorithms implemented in blenders like Smartblend and Enblend.

If the misalignment is visible in the final image, then either the images aren't well aligned or there are enough people and other objects moving around in the images that seamless blending is impossible regardless of how well aligned the images are. I don't think this is the case for your panorama, but regardless of this, here are two things that you can try to improve the image alignment:

1. To the extent feasible, place control points along the entire length of the overlap area, rather than clustering them in one region (your project already looks pretty good in this respect, but adding two or three more points might be helpful). Try optimizing again after adding a couple more points.
2. Try adding FOV and perhaps the d/e parameters to the list of variables that are optimized. Even though PTAssembler was able to calculate the FOV from the EXIF data, the EXIF data is usually only approximate, and you can finetune the FOV value by optimizing it. Also, most lenses aren't perfectly centered, so I find that optimizing the d/e can also help improve the results slightly. Add these variables (by checking the appropriate boxes on the step 4 screen), and then optimize manually. Keep an eye on the results; if you find that the FOV has changed a lot (i.e. by more than 20% or 30%), then chances are that the optimized FOV isn't an improvement after all, and you shouldn't accept the change.
How can I maximize the size of the preview image within the preview window?...most of the preview window is empty space
Short Answer: Decrease the Horizontal and/or Vertical FOV values, and press the "Re-Draw" button.

Long Answer: The preview window always shows the point where yaw=0 and pitch=0 at the center of the screen (the intersection of the red and blue lines). Changing the horizontal and vertical FOV values changes how much angular field of view is shown above/below and left/right of this point. If you check the "Yaw/Pitch" checkbox, you'll see a grid superimposed on the preview showing lines that indicate 10 degree increments that may help make this more understandable.

Anyway...you should be able to get an excellent result with these images. I added a few more control points, optimized the project again after including FOV and d/e, and then created the result below (using rectilindrical projection to reduce the amount of stretching along the vertical axis):

Image

The alignment is really good. Here is a crop from the bottom of the pano where the images overlap...the blender (Smartblend in this case) has done a nice job of routing the seam to avoid the moving people, and hides any residual minor misaligments. Note that the ghosted child is present in the original image...it isn't an artifact of the blending.

Image

Lastly...here is the project file after my changes.

Hope this helps,

Max

stic
Posts: 5
Joined: Fri Jun 21, 2013 8:21 am

Re: I can't stitch a simple 2 image panorama!

Post by stic » Sun Jun 23, 2013 1:22 am

Dear Max,

Following your advice on manually optimizing FOV, and additional D and E parameters, I got everything aligned! I'm now going back to all the other images where I have problems with, after gaining this new understanding of "manually" optimizing. This knowledge will definitely improve my efficiency in creating panorama images! Thanks for your help! :)

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest