Obtaining similar results with pfstmo_mantiuk06 and luminance-hdr

70 views
Skip to first unread message

Christophe-Marie Duquesne

unread,
May 20, 2013, 7:15:54 AM5/20/13
to pfst...@googlegroups.com
Hi,

First, I apologize if you are getting this message for the second time. I just tried to post another version of this message using the googlegroups web interface, but my post does not appear. I am assuming something went wrong, so I am reposting it using a regular email.

I am trying to obtain, using the command line, images that are similar to the ones I obtained using luminance-hdr.

With luminance-hdr (version 2.3.1):
Open the hdr file, run the mantiuk06 operator with default parameters, save as jpeg (quality 75%). Parameters for mantiuk06:
- Contrast factor: 0.1
- Saturation factor: 0.8
- Detail factor: 1.0
- There is a lso a pregamma step of 1.0
Result: http://i.imgur.com/fekAx0x.jpg

With luminance-hdr-cli (version 2.3.1):
No result obtained, it crashes. I am attaching the verbose output and a stacktrace obtained with gdb, in case anybody knows what to do with it (I did not find a bugtracker for luminance-hdr-cli).

With pfstmo (pfstmo version 1.5):
pfsin IMGP0188-IMGP0190.hdr | pfstmo_mantiuk06 -v | pfsgamma -g 2.2 | pfsout mantiuk06_pfstmo.jpg
pfstmo_mantiuk06: algorithm: contrast mapping
pfstmo_mantiuk06: contrast scale factor = 0.1
pfstmo_mantiuk06: saturation factor = 0.8
pfstmo_mantiuk06: using conjugate gradients (itmax = 200, tol = 0.001).
completed 100%
Result: http://i.imgur.com/6rVQ7qr.jpg (it looks a bit blurry)

Luminance-hdr seems to apply a gamma of 1.0 as a preprocessing step. I tried that too:
pfsin IMGP0188-IMGP0190.hdr | pfsgamma -g 1.0 | pfstmo_mantiuk06 -v | pfsout mantiuk06_pfstmo.jpg
pfstmo_mantiuk06: algorithm: contrast mapping
pfstmo_mantiuk06: contrast scale factor = 0.1
pfstmo_mantiuk06: saturation factor = 0.8
pfstmo_mantiuk06: using conjugate gradients (itmax = 200, tol = 0.001).
completed 100%
Result: http://i.imgur.com/pUxxIaK.jpg (very dark).

Basically, my question is: is there a way to obtain, from the command line, results that would be closer to what I could obtain with luminance-hdr? Am I not setting correctly some parameters?

I am uploading the original hdr file on http://chm.duquesne.free.fr/IMGP0188-IMGP0190.hdr

Best regards,
Christophe-Marie
luminance-hdr-cli_gdb_stacktrace.txt
luminance-hdr-cli_verbose_output.txt

Christophe-Marie Duquesne

unread,
May 20, 2013, 8:53:54 AM5/20/13
to pfstools
Hello again,

I found the answer to my own question on luminance-hdr's flickr discussion group. Basically, it seems that they tuned the algorithms from pfstools. As a consequence what I am asking seems to be impossible. It would have been nice if they had contributed their changes back.

Source: http://www.flickr.com/groups/qtpfsgui/discuss/72157628060123216/

Rafal

unread,
May 20, 2013, 4:17:34 PM5/20/13
to pfst...@googlegroups.com, ch...@chmd.fr
Hi,

As far as I know, Luminance uses a forked version of pfstmo. Since the "fork" happened, there were quite a few changed in both projects, so it is unlikely that you will get exactly the same results.

To fine-tune the results, output to pfsview instead of pfsout:

... | pfstmo_mantiuk06 ... | pfsview

Then adjust the 'dynamic range window' and perhaps gamma to get good contrast. You can save PNG or JPEG with ctrl+S.

Rafal

Christophe-Marie Duquesne

unread,
May 20, 2013, 5:39:21 PM5/20/13
to pfstools
On Mon, May 20, 2013 at 10:17 PM, Rafal <man...@gmail.com> wrote:
> Hi,
>
> As far as I know, Luminance uses a forked version of pfstmo. Since the
> "fork" happened, there were quite a few changed in both projects, so it is
> unlikely that you will get exactly the same results.
>

Yes, I understood that. At first, I thougtht that luminance-hdr was
part of pfstools, mainly because of its former name "qtpfsgui".

> To fine-tune the results, output to pfsview instead of pfsout:
>
> ... | pfstmo_mantiuk06 ... | pfsview
>
> Then adjust the 'dynamic range window' and perhaps gamma to get good
> contrast. You can save PNG or JPEG with ctrl+S.

Thank you very much for the advices.

I really like the pfstools project, the use of stdin and stdout is
very unixy. It makes the whole project nice, beautiful, and user
friendly.
Reply all
Reply to author
Forward
0 new messages