align_image_stack fails to open EXR files

Bug #1750398 reported by trougnouf on 2018-02-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

align_image_stack fails to open EXR files generated with darktable, the output is as follow:

$ align_image_stack DSCF4117.exr DSCF4118.exr -p OUT.exr
/build/hugin/src/hugin-2018.0.0/src/hugin_base/panodata/SrcPanoImage.cpp 346 Error opening file
/build/hugin/src/hugin-2018.0.0/src/hugin_base/panodata/SrcPanoImage.cpp 346 Error opening file
Written project file OUT.exr

(an output file is generated, but it is only 12.9KB)

I have tried every compression method (off, RLE, ZIP, ZIPS, PIZ, PXR24, B44, B44A) and the result is consistent. I'm using Arch Linux with hugin 2018 and openexr 2.2.0.

Tags: exr Edit Tag help
trougnouf (trougnouf) wrote :
trougnouf (trougnouf) wrote :

Sorry I had the wrong command on my laptop (outputting a debug file). After doing a system upgrade and entering the right command, I get (a) valid output file(s)!

The "/build/hugin/src/hugin-2018.0.0/src/hugin_base/panodata/SrcPanoImage.cpp 346 Error opening file" persists but it doesn't seem to have an effect (?)

trougnouf (trougnouf) wrote :

I was able to replicate the bug I had originally with another set of files (though I'm not sure I should upload another 400MB here?), in this case no file is written (no debug file either).

$ align_image_stack -m -a OUTexr -p errorfile DSCF3716.exr DSCF3717.exr
/build/hugin/src/hugin-2018.0.0/src/hugin_base/panodata/SrcPanoImage.cpp 346 Error opening file
/build/hugin/src/hugin-2018.0.0/src/hugin_base/panodata/SrcPanoImage.cpp 346 Error opening file
terminate called after throwing an instance of 'vigra::PreconditionViolation'
Precondition violation!
correlateImageFFT(): kernel larger than image.

Aborted (core dumped)

tmodes (tmodes) wrote :

Can you load the exr file in Hugin? Or is there also an error or crash?

trougnouf (trougnouf) wrote :

I can! If I go in Advanced mode and select Feature Matching > Align image stack, then it fails with the same error, but Hugin's CPFind is able to create control points, and the default "align image" in simple view shows the images and it can do it as well (with some "error opening file" errors that don't seem to have any effect) although the text goes by too fast to read.

tmodes (tmodes) wrote :

I fixed the error message in default branch. You now get a more verbose warning instead.

align_image_stack was written for alignment of images directly from camera. So no testing for exr was done. I've not found the bug until now.

PS: In Hugins preferences there is an option to copy log messages to clipboard > then all messages (even when the text if fast) are copied to the clipboard and can be inspected afterwards.

tmodes (tmodes) wrote :

I added some more error checking to fine tune code. Maybe this fixes the issues with exr files. Please report back.

Changed in hugin:
status: New → Fix Committed
trougnouf (trougnouf) wrote :

Yes, it works now (I tried a bunch of files including the last problematic ones). I get the following and a series of .tif output which darktable understands.

$ align_image_stack -m -a OUT DSCF3716.exr DSCF3717.exr DSCF3718.exr
Exiv2: Error reading metadata (DSCF3716.exr: The file contains data of an unknown image type)
Exiv2: Error reading metadata (DSCF3717.exr: The file contains data of an unknown image type)
Exiv2: Error reading metadata (DSCF3718.exr: The file contains data of an unknown image type)
Written aligned images to files with prefix "OUT"

Thank you!

tmodes (tmodes) wrote :

That are good news. Thanks for feedback.

tmodes (tmodes) on 2018-02-24
Changed in hugin:
milestone: none → 2018.2beta1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments