Adaptive adjustment of image sizes

51 views
Skip to first unread message

Abrimaal

unread,
Jun 28, 2018, 12:03:10 PM6/28/18
to hugin and other free panoramic software
I was trying to stitch two photos of the same object. One image was large about 5000x3200 px, the other one was smaller 1200x800.
The first one conatined lens data, the other did not.

The detector did not find any control points, so I placed them manually where they should be.

After optimization (y,v,p,r) the 2nd image was still much smaller. So I copied the field of view from the 1st image to the 2nd.
However they still varied in size, so there were many attempts to put a correct value there.
Finally the panorama was rendered correctly.

Another example - one image is original from a camera, the other one is cropped from the original, both with EXIF data.
The field of view is of both images is set to the same value, but the cropped image is much larger.

Now questions:

Is there a way to calculate the field of view by comparing the distance between control points? (rectilinear projection with position anchor, centered)
Just as one of images can be set as anchor for position and exposure, to set one of images as the base for field of view?
Can the control point detector (temporarily, optionally, if CPs not found) resize all images to the same size to find control points?

I can add that a mobile app can stitch images of various size and aspect if it only finds common points. I use this for merging two or more exposures or applied filters.
Even if images vary in size, they are almost perfectly stitched, the blurred (overlaid) details can be corrected in Hugin by masking.



T. Modes

unread,
Jun 28, 2018, 1:46:30 PM6/28/18
to hugin and other free panoramic software


Am Donnerstag, 28. Juni 2018 18:03:10 UTC+2 schrieb Abrimaal:
After optimization (y,v,p,r) the 2nd image was still much smaller. So I copied the field of view from the 1st image to the 2nd.
However they still varied in size, so there were many attempts to put a correct value there.
For this use case the preset y,p,r,v is not the best choice. This preset optimize hfov of both images. You need to optimize hfov of the second image only in this case.
So use user defined optimization and optimize v,y,p,r of second image only.

Another example - one image is original from a camera, the other one is cropped from the original, both with EXIF data.
The field of view is of both images is set to the same value, but the cropped image is much larger.
This is expected because there is no information about the cropping in the Exif data. So Hugin does a wrong guessing.

Abrimaal

unread,
Jun 30, 2018, 11:31:50 AM6/30/18
to hugin and other free panoramic software
 Should I exclude the 1st image in the simple mode and optimize? How? I cannot find in the menu how to adjust dimensions (field of view) of the 2nd image.

T. Modes

unread,
Jul 1, 2018, 3:16:20 AM7/1/18
to hugin and other free panoramic software


Am Samstag, 30. Juni 2018 17:31:50 UTC+2 schrieb Abrimaal:
 Should I exclude the 1st image in the simple mode and optimize? How? I cannot find in the menu how to adjust dimensions (field of view) of the 2nd image.

In the panorama editor go to tab images, select "custom parameters" under geometric optimizer. Then go to optimizer tab. All checkboxes for the first image should be unticked. For the second image only yaw, pitch, roll and hfov should be ticked, then select optimize.
Reply all
Reply to author
Forward
0 new messages