Yo'av,

You didn't send the message to the list, I think - just to me personally, so Donald and Terry probably didn't see your answer.
In any case I believe there is no Hugin mystery here.
First, as I wrote, if you scan the same photo twice, even with different resolutions, it should be enough to translate, rotate and scale one image in order to have a perfect fit. (I'm ignoring shear here.) There's no use for the full Hugin camera model. If you don't get a good fit, then there's something else wrong with your scanning process, something Hugin can't compensate for.

Just looking at the two source images in an image viewer gives the impression that the shrouded tree has the same width, but has a larger height in 14560014.jpg. Comparing width and height of this object gives:

14560002.jpg W: 803-3205=2402  H: 1200-5271=4071 Aspect: 1.6948
14560014.jpg W: 201-787=586 H: 300-1298=998 Aspect: 1.7031

Difference: 1.7031-1.6948=0.0083  At 4000 px: 4000*0.0083=33 px

So the two images don't have the same resolution proportions in X and Y. Keeping the width the same, the height differs by 0.8% which at around 4000 pixels gives an error of 33 pixels. So this is why Hugin can't optimize. If it lines up the X values of the control points perfectly, the Y values can differ by up to 33 pixels due to the different Y resolutions of the images. And Hugin can't just scale one dimension of a photo, as far as I know (though I'm still at the 2012 version, so something might have changed).

To check if this is the only problem, I scaled down the hi-res image from 4181x6305 to 4160x6305 and then tried to optimize again.
I now get almost a perfect fit.
However, it's still not quite perfect. Since the images are now so close to eachother, visual comparison is possible. I get the impression that the resolution varies a little over the whole image, i.e. some pixel rows are closer together, some are further apart and I don't see this in the X direction. This indicates that the scanning sled motion is not perfectly linear. This is also probably never the case and I can't say if this scanner is better or worse than any other.

I placed my project and input/output images here:
https://dl.dropboxusercontent.com/u/95455644/hugin.zip

Regards,
Pell

On 2015-04-05 09:43, Yo'av Moshe wrote:
Hi,

Donald - could you include your pto file? As for the distortion I'm seeing, it's quite easy to notice on my output - I'm aligning image B on top of image A, matching the the top left corner of the tree, and then when checking the bottom right corner I can see it's off by about 15px-20px . That's the distortion I mean.

Terry - I've tried both pto and they both still seem to include some distortion when aligning the images. I can't really tell how good the fused image on your screenshot is because it's quite zoomed out :-/

Pell - The noise doesn't have to do with the quality of the scanning AFAIK. It's a scanned film from a quite good lab over here, and the noise is because of the type of the film and the relatively high ISO/ASA level. However, while I understand why this can create false control points, I'm not really sure why it would matter when I'm setting the control points myself? I've tried putting the two images in your zip file one on top of the other and again there seem to be the same distortion I mentioned above.

Please note that I'm not trying to create the fused image using Hugin - I'm generating two different files specifically so I can tweak the final result of mixing the two later on using Photoshop/Gimp.

Anyway thank you all so much for your time. It really is appreciated a lot. I won't be available during the coming week (holiday over here!) so sorry in advance for the my delayed response.

And again thank you.

Yo'av




2015-04-05 3:50 GMT+03:00 Pell Emanuelsson <p_emanuels...@gmx.net <mailto:p_emanuels...@gmx.net>>:

    Yo'av,

    I'm not sure what you are trying to do. None of the images are
    scanned very well... Much noise.

    Anyway, since it's the same photo scanned twice, there's no need
    to change any camera parameters.
    They are the same for the two images. Due to repeatability issues
    it might make sense to optimize FOV for one of the photos.
    Also no need to set many control points. I set only four points
    and they match quite well. At least well enough for optimizing
    exposure.
    To transfer the exposure parameters from one photo to the other, I
    simply chose to optimize the high-res image for exposure, color
    and camera response. I chose to use 4000 points instead of the
    default 400, since the whole images overlap.
    I still think it would be better to experiment with different
    settings while scanning.
    If your scan program doesn't support this, check out VueScan.
    http://www.hamrick.com/

    I placed the two result images and a PTO here:
    https://dl.dropboxusercontent.com/u/95455644/hugin.zip

    The image 14560014-145600020001.jpg is the one you want (the high
    resolution with new exposure).

    The PTO is for Hugin 2012.0.0.

    Regards,
    Pell



    On 2015-04-03 09:20, Yo'av Moshe wrote:
    Hi,
    Thank you again for your kind help!

    Both jpegs and the .pto file can be downloaded here:
    http://bit-else.com/hugin.zip

    @panostar - I generally never touched any of the lens parameters,
    but I noticed the focal length was set slightly differently for
    both images so I set them both to 23.56 (the original setting of
    one them). It didn't seem to change much when aligning them
    though :-(

    Yo'av

    On Friday, 3 April 2015 01:04:14 UTC+3, Tduell wrote:

        Hello Yo'av,

        On Thu, 02 Apr 2015 19:06:44 +1100, Yo'av Moshe
        <bje...@gmail.com> wrote:

        >
        > Any ideas for why my control points doesn't seem to fix the
        distortion? I
        > believe Hugin is giving them a really bad score (I had to
        take the
        > threshold to 0.3 in the preferences panel) but I think it's
        because of
        > the noise and the size difference. Do I need to add more
        maybe?
        >

        It's not obvious what the problem is without seeing your
        project images.
        Are you able to make them available so we can look more
        closely at the
        problem?
        If so, a good way to do that is put the images on Dropbox or
        similar,
        along with your .pto file.

        Cheers,
-- Regards,
        Terry Duell

-- A list of frequently asked questions is available at:
    http://wiki.panotools.org/Hugin_FAQ
    ---
    You received this message because you are subscribed to the
    Google Groups "hugin and other free panoramic software" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to hugin-ptx+unsubscr...@googlegroups.com
    <mailto:hugin-ptx+unsubscr...@googlegroups.com>.
    To view this discussion on the web visit
    
https://groups.google.com/d/msgid/hugin-ptx/a83d0f95-e24d-4dab-8b8c-539ce982a588%40googlegroups.com
    
<https://groups.google.com/d/msgid/hugin-ptx/a83d0f95-e24d-4dab-8b8c-539ce982a588%40googlegroups.com?utm_medium=email&utm_source=footer>.
    For more options, visit https://groups.google.com/d/optout.




--
Yo'av Moshe

--
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- You received this message because you are subscribed to the Google Groups "hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/5523013F.3010703%40gmx.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to