Why use focal length as scale factor for warps?

asked 2018-02-22 01:17:22 -0600

Conundraah gravatar image

Hi folks!

I recently got my hands on the stitching_detailed.cpp and try to understand its details. Unfortunately some comments are missing for the, in my opinion, more mysterious details:

I get why we have to warp the images to a composition surface but why do we set the median focal length after bundle adjustment as scale factor for the warper?

Why are parts of the panorama differently scaled than the image used to create the panorama?

Any help is greatly appreciated!

Best regards

Conundraah

edit retag flag offensive close merge delete

Comments

"median focal length after bundle adjustment " you need to resize image and when you choose median value it means image is resized with a minimal distorsion.

If you choose one value, one image will be not resized and some others images scaling factor will be greater than median value = distorsion risk or wrong interpolation

LBerger gravatar imageLBerger ( 2018-02-22 03:46:30 -0600 )edit

Thank you, LBerger! I think, I start to understand. If I capture a long wall, it is hard to keep the exact distance to that wall for all images I capture. If I vary my distance to the wall, e.g. move closer or farther away, the wall in that particular image would be larger or smaller compared to the wall in the other images. To account for this difference in scale, I rescale all images using the median focal length. Do I use the focal length, because it tells me, how much of the scene was captured and thus also indirectly, roughly, how the scaling changed? Would it be possible, to stitch the panorama, when every image is "scaled" with its own focal length, so non of the images is resized? Would this also result in a higher distortion risk or wrong interpolation?

Conundraah gravatar imageConundraah ( 2018-02-23 01:19:18 -0600 )edit

It is possible to stitch the panorama, when every image is "scaled" with its own focal length if descripor (SIFT, ORB , SURF...) are invariant by rotation, translation and scale. see https://en.wikipedia.org/wiki/Scale-i...

LBerger gravatar imageLBerger ( 2018-02-23 02:33:04 -0600 )edit

Thanks again! I will give it a try. Two last question though: Was my assumption on why I have to scale the images correct? (To account for the difference in scale between the images, I rescale all images using the median focal length?) Do I use the focal length, because it tells me, how much of the scene was captured and thus also indirectly, roughly, how the scaling changed?

Conundraah gravatar imageConundraah ( 2018-02-23 04:06:32 -0600 )edit