Hugin loads images, but thinks hfov is -nan

Bug #1388469 reported by tduell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hugin
Fix Released
Undecided
Unassigned

Bug Description

Build of hugin-executor branch (6759:6d52a5552e08) on Fedora 20 x86_64.
Select a group of 4 images which are loaded without complaint, but 'lens parameters' show hfov = -nan for all images.
My previous hugin build (6758:624abeb108a1) could not find the hfov in the image data for these images (tiff files supplied by others) and would pop up the dialog box requesting input. The latest build happily loads the images, maybe it finds the hfov, but then appears to store the hfov as -nan.

Tags: hugin
Revision history for this message
tmodes (tmodes) wrote :

The image loading code in Hugin has not been changed in the last time.
When I open an image without exif information the HFOV dialogs pops up.

So the image contains only partially exif information. Maybe you updated exiv2 library and there changed something?
Could you provide one of the problematic image?

Changed in hugin:
status: New → Incomplete
Revision history for this message
tduell (tduell-iinet) wrote :

Hello Thomas,
This is a curious thing. I couldn't see anything in the hugin code that would affect this, but there was no obvious local change either. My exiv2 hasn't changed, that's a local build.
The problem images are uncompressed tiff, and each is 66MB, so I'm reluctant to provide one as-is. A zip or bz2 archive only gets down to about 44MB. Conversion to a jpg (using gimp) is much more acceptable, but that changes the exif and hugin will pop up the hfov dialog.
Pending some way of providing one of the images in a reasonable size, which demonstrates the problem, I have attached the output from exiv2 and exiftool, in case this helps.

Cheers,
Terry

Revision history for this message
tduell (tduell-iinet) wrote :

I managed to get Darktable to export one of the offending tiff files as a jpeg, 5.7MB, which reproduces the problem here in hugin.
Add images, image loads without dialog box requesting hfov, lens parameters show Hfov=-nan.

Cheers,
Terry

Revision history for this message
tmodes (tmodes) wrote :

Hi Terry,

I can't reproduce the issue. It works here on 3 different version. I'm always getting the HFOV input dialog.
One untested issue could be the lens database. If no crop factor was found in the image metadata, Hugin looks in the database. Maybe there is a wrong value saved in the database. Could you try to delete the lens database and then try it again? (The location of the lens database can be seen on the about tab or call lensdb without parameters).

PS: The image contains 2 ICC profiles, but the second ICC profile contains invalid data.
exiftool -warning -a img_0001.jpg
Warning : Invalid Metadata data
I'm not sure if this is related to the bug.

Revision history for this message
tduell (tduell-iinet) wrote :

The lens database is the problem.
When the lens database is removed hugin pops up the HFOV input dialog.
Good sleuthing!

Thanks for your help.
Cheers,
Terry

Revision history for this message
tmodes (tmodes) wrote :

Hi Terry,

thanks for reporting back. I added additional checks to prevent writing invalid crop factors to database. Hope this is now fixed.

Changed in hugin:
status: Incomplete → Fix Committed
Revision history for this message
tduell (tduell-iinet) wrote :

Hello Thomas,
I think it is fixed now...not entirely sure.
I eventually managed to delete all the records from the lens database for the offending lens, then attempted to recalibrate that lens (using hugin_calibrate_lens) , but kept getting an error when attempting to save to the database.
The lens focal length of 50mm was being detected but not the crop factor, which I was entering as 1, when I entered a crop factor of 1.0 it saved OK.
When I load images (one of which is the example image provide earlier) from that camera/lens into hugin it pops up the HFOV dialog box with the 50mm focal length entered, but it doesn't know the crop factor. I guess there is insufficient info in the exif data.
If it helps I have attached one of the calibration images which

Cheers,
Terry

Revision history for this message
tmodes (tmodes) wrote :

Aargh,

I finally found the bug you mentioned originally. It should be fixed now.

Calibrate_lens_gui should now also show incomplete values. And it stores automatically the crop factor of the cam.

When loading the image, the focal length is read from EXIF, the crop factor from the database and the HFOV is correctly calculated.

Revision history for this message
tduell (tduell-iinet) wrote :

Hello Thomas,
I have yet to test these changes, and will report back if I see any problems.
Given the history on this, is there a recommended way of deleting a bad or unwanted lensdb entry?
I used Sqliteman, but it was a bit of guess work that I was selecting the correct entries.

Cheers,
Terry

Revision history for this message
tduell (tduell-iinet) wrote :

Build of the current hugin_executor branch (6766:e2bc1c33f588) is working OK, for all the tests I have run, which included a recalibration of the Canon lens, using the calibration image supplied earlier.
When loading the project images(example in comment #3) the images are loaded without requiring the HFOV dialog and they now have the correct hfov.

Cheers,
Terry

tmodes (tmodes)
Changed in hugin:
milestone: none → 2015.0beta1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.