help needed with producing HDR panorama

138 views
Skip to first unread message

Albert Szostkiewicz

unread,
May 6, 2019, 12:24:41 AM5/6/19
to hugin and other free panoramic software
Hi!

I work in VFX industry and HDR with high dynamic range are crucial for me. So far I have been using in-house software and at home I am working with PTGui via wine (as there is no Linux version). I always wanted to move to linux native stitching software like Hugin, but I was never successful in producing a single, proper HDR. I am little bit spoiled by the fact that at work, in-house software works as: 1. drop raw images and press 'calculate' and after 5mins it's done properly. PTgui works almost the same way but requires few more buttons to push :).
So OK, lets try Hugin! 
After lengthy and passionate discussion about RAW support (https://groups.google.com/forum/#!topic/hugin-ptx/8hXYmyxwMys) I understood that today Hugin should support RAWs (?). I've tried that but it crashed immediately. It's ok, I went with suggested method, in mentioned discussion thread and I've converted CR2 files myself to TIFF format using dcraw:

for i in *.CR2; do
    BASENAME=${i%.CR2}
    dcraw -v -w -4 ${BASENAME}.CR2
    convert -gamma 2.2 ${BASENAME}.ppm ${BASENAME}.tif && rm ${BASENAME}.ppm
    exiftool -tagsfromfile ${BASENAME}.CR2 -overwrite_original_in_place -exif:all ${BASENAME}.tif
done

Having TIFFs, I could start my work. So I have 120 images that represent 12 groups of 10 exposures per angle, which i shot using manual 16mm fish eye lens.
After loading those files into Hugin, I've selected "Stack/Set stack size" and set them to 10. So far so good.

stacks.png


Then, using Hugin's CPFind I've clicked "Create control points". That took ~30-40mins, maybe even more. It surprises me as PTGui does same work within 1-2mins max with same set, while dealing with RAW files directly.
Now I have my hdr preview. Preview which i had to straighten and center and move. Preview itself concerns me a little as it shows lots of artifacts. This is also something i am not used to when using other software as at this stage usually preview is quite good representation of final result.. But ok..

aligned.jpg


Last step then! "3. Create panorama ..."! I select "High dynamic range" option as this is what I am expecting with EXR output. Now I am not sure how many hours this calculation took, as I left it over night, but results are very surprising and unexpected. For sure I am missing some steps as i am getting almost always same, bad results with any other set of photos.

HDR043_hugin_hdr.jpg



So maybe somebody from hugin creators or experienced users could kindly suggest or guide me?.
I've been searching over the web and looking into the documentation but I failed to figure out what steps I might be missing to get at least OK result and hopefully speed up the whole process ?

Thanks in advance!

Bruno Postle

unread,
May 8, 2019, 5:40:19 AM5/8/19
to hugi...@googlegroups.com
Hi, I don't have a solution for your problem, clearly the result is messed up.

It seems that trying to figure this out with a 120 photo set in a 360° panorama is going to be hard and unrewarding. Hugin can stitch partial panoramas and even single stacks. So I would suggest trying a single stack and seeing if Hugin can produce HDR data from your photos at all; if this works try just a pair of adjacent stacks. Please do report back any success or failure.

--
Bruno

Albert Szostkiewicz

unread,
May 10, 2019, 4:21:54 AM5/10/19
to hugin and other free panoramic software
Hi Bruno!

Thanks for suggestion!
So I've tried to stitch a single stack of tiffs. This is my set of 12 positions with single exposure:

set01.jpg


stack03.jpg


And result after long computation was this:

Tiffs were generated using ufraw and they are 16bit. Resulting panorama has is few stops down for some reason (and has visible artifacts)

set02.jpg


I would call it a failure :/

Bruno Postle

unread,
May 11, 2019, 3:54:47 AM5/11/19
to hugin and other free panoramic software
On Fri 10-May-2019 at 01:21 -0700, Albert Szostkiewicz wrote:
>
>Thanks for suggestion!
>So I've tried to stitch a single stack of tiffs. This is my set of 12
>positions with single exposure:

>And result after long computation was this:

>Tiffs were generated using ufraw and they are 16bit. Resulting panorama has
>is few stops down for some reason (and has visible artifacts)

>I would call it a failure :/

It is good in parts. I think the horrible artefacts at the bottom
are caused by the panohead, which is both present and not not
present in each adjacent photo, this panohead will need to be masked
out in the Hugin Mask tab so that it is ignored when stitching.

--
Bruno

Matija Kogoj

unread,
May 11, 2019, 9:56:52 AM5/11/19
to hugin and other free panoramic software
Many of us have the same problem. In my experience it seems to be related to Enblend blender.
Switching this to Verdandi ("builtin") option in the stitcher tab (advanced and expert modes) might help. The result will not be perfect; in my case there were often visible seams left over, but it generally changed the output.
Khan deghosting takes a f**kton of time; avoid it.

At the following link you can read about my latest conversation about this, and all the accompanying notes:
I should note that what solved the issue then does not work in my latest batch. I believe it is due to high parralax more than .

For your case I would like to summarize two points:
  1. if the photometric calc returns too many grey values (30+ stops) you will probably have black holes ("gaps" in my text). You should expect a certain amount of EV levels and watch for breaches of that number. I have noticed this usually influences the next point.
  2. if the stitching takes a long time or hangs at certain points the panorama will probably be broken. Usually the worse it is the longer it takes. Here it helps to look at the log output and expect relatively regular progression in stitching and calculating new views. If it takes 30 minutes to calculate 1 picture you are either working for NASA or you can press cancel. ← exaggeration, use your own metric.

I use a circular fisheye and make 5 views by 6-10 exposures for equirectangular exr output. In best cases the whole process took less than an hour including corrections.

Albert Szostkiewicz

unread,
May 12, 2019, 12:14:19 AM5/12/19
to hugin and other free panoramic software
Thanks for suggestions!

Same set of photos without any intervention in different program works like a charm out of the box and stitches 100% correct HDR pano.
Just trying to understand, whenever it is a limitation of Hugin or a design that would require user in-depth knowledge of different algorithms that need to be used to get this result (if possible?)

pano_ssies.jpg


Hey @Matija ! I have tried wider lenses but I am happy with sharp quality result of 16mm fisheye. Other software deals with it without issues, but I am trying my best to give Hugin a shot as it is (to my knowledge) only Linux pano tool that could be scripted

Thanks once again!

dkloi

unread,
May 16, 2019, 1:14:20 PM5/16/19
to hugin and other free panoramic software
Looks like there are some problems with the seam generation in Enblend that can lead to some of the problems you are seeing. Try turning off seam optimisation to see if that helps (http://enblend.sourceforge.net/enblend.doc/enblend_4.2.xhtml/enblend.html#sec%3Amask-generation-options). To isolate the problem, you can generate the remapped images in Hugin and save them, then run Enblend separately with different options. You can also run different image blenders on the remapped images to see what works.

You also want to try generating HDR (e.g. EXR format) files from your exposure stacks first before stitching them in Hugin. I've used this method previously with success.

Daniel.
Reply all
Reply to author
Forward
0 new messages