DCRaw to PTGui gamma correction fail

293 views
Skip to first unread message

Sébastien

unread,
Oct 29, 2015, 11:46:28 AM10/29/15
to PTGui Support
Hi,

I create TIFF from CR2 with DCRAW using -v -o 1 -q 3 -4 -T.

When I import the generated tiff in PTGui, the gamma correction seems to be wrong. It is displayed too dark and the panorama as well.
In photoshop the tiff is played correctly.

Anybody has an idea ?

Thank's,

Seb

Erik Krause

unread,
Oct 29, 2015, 12:06:26 PM10/29/15
to pt...@googlegroups.com
Am 29.10.2015 um 16:46 schrieb Sébastien:

> I create TIFF from CR2 with DCRAW using -v -o 1 -q 3 -4 -T.

-4 makes linear gamma, which is displayed dark if not corrected.

> When I import the generated tiff in PTGui, the gamma correction seems to be
> wrong. It is displayed too dark and the panorama as well.
> In photoshop the tiff is played correctly.

This is most likely because photoshop is color managed and PTGui not.
PTGui should pass the input profile directly to the output and not alter
any colors. Is the resulting panorama in photoshop too dark, too?

However, why do you do this? dcraw is not the best raw converter. It
could well be the jpegs straight from the camera have higher quality
than dcraw output.

--
Erik Krause
http://www.erik-krause.de

Sébastien

unread,
Oct 30, 2015, 5:16:29 AM10/30/15
to PTGui Support
I use -4 -T because I need a Linear 16 bits TIFF to correct chromatic aberrations before to create the hdr panorama. Other options are optional.

The resulting from photoshop conversion (linear/TIFF to sRGB/JPEG) give a correct value on display (gamma corrected).

My final file is a HDR. The problem is most after a dcraw conversion the display in PTGui is too dark. If you convert directly the cr2 files with PTGui, using dcraw too, the display is correct. Why ?

Seb.

 

Erik Krause

unread,
Oct 30, 2015, 8:38:18 AM10/30/15
to pt...@googlegroups.com
Am 30.10.2015 um 10:16 schrieb Sébastien:
> I use -4 -T because I need a Linear 16 bits TIFF to correct chromatic
> aberrations before to create the hdr panorama. Other options are optional.

Which program needs linear 16bit to correct for CA?

Since you seem to have photoshop, why not use Adobe Camera Raw? The
chromatic aberration correction is very good and fully automatic, not to
speak of superior highlight and shadows recovery, denoising etc.

> My final file is a HDR.

Do you mean HDR in the original meaning (32bit per channel) or do you
mean tonemapped HDR? However, it's far easier and better to do raw
conversion in a dedicated program and feed the resulting images to
PTGui, which will output either a true HDR (for IBL or tonmapping later)
or a tonemapped / exposure fused image.

> The problem is most after a dcraw conversion the
> display in PTGui is too dark. If you convert directly the cr2 files with
> PTGui, using dcraw too, the display is correct. Why ?

Because PTGui does the gamma conversion in this case.

--
Erik Krause

Sébastien

unread,
Oct 30, 2015, 1:58:25 PM10/30/15
to PTGui Support


On Friday, October 30, 2015 at 1:38:18 PM UTC+1, Erik Krause wrote:
Am 30.10.2015 um 10:16 schrieb Sébastien:
> I use -4 -T because I need a Linear 16 bits TIFF to correct chromatic
> aberrations before to create the hdr panorama. Other options are optional.

Which program needs linear 16bit to correct for CA?

I just need to stay in linear 16 bit for my 3D worflow.
 

Since you seem to have photoshop, why not use Adobe Camera Raw? The
chromatic aberration correction is very good and fully automatic, not to
speak of superior highlight and shadows recovery, denoising etc.

Photoshop seems to be good for CA, but not really for RAW linear conversion. 


 

> My final file is a HDR.

Do you mean HDR in the original meaning (32bit per channel) or do you
mean tonemapped HDR? However, it's far easier and better to do raw
conversion in a dedicated program and feed the resulting images to
PTGui, which will output either a true HDR (for IBL or tonmapping later)
or a tonemapped / exposure fused image.

I need real HDR, not tonemapped.
 
> The problem is most after a dcraw conversion the
> display in PTGui is too dark. If you convert directly the cr2 files with
> PTGui, using dcraw too, the display is correct. Why ?

Because PTGui does the gamma conversion in this case.
TIFF are linear so PTGui should gamma correct it for the display. Even if I generate the panorama, it doesn't correct the gamma.

So which tools to use to do CA on linear files (TIFF) and build a HDR panorama ?

Thank's for help.
Seb.
 

--
Erik Krause

Erik Krause

unread,
Oct 31, 2015, 12:04:00 PM10/31/15
to pt...@googlegroups.com
Am 30.10.2015 um 18:58 schrieb Sébastien:
> I just need to stay in linear 16 bit for my 3D worflow.

Ok. Then I'd do a standard HDR workflow including raw conversion in ACR
to usual 16bit TIFF, then either merge to HDR and stitch later or let
PTGui do the HDR merging and stitching. In both cases output HDR
(non-tonemapped, .exr or .hdr format) which is in linear gamma space.
You then can reduce to 16bit either in your 3D program or in photoshop
using a linear gamma color profile:
http://fnordware.blogspot.de/2008/05/making-linear-icc-profile.html

Erik Krause
Message has been deleted

PTGui Support

unread,
Dec 2, 2015, 3:48:12 AM12/2/15
to pt...@googlegroups.com
Hi Sebastien,

Currently PTGui is hard coded to assume that a 16 bit file is nonlinear
and thus it will use (and optimize) the camera curve as shown in the HDR
tab. It's also hardwired to assume that a 32 bit (floating point) file
is always in linear space; for 32 bit files the camera curve is ignored.
I'd be the first to admit that this is a bit quirky.

So the workaround for now is to convert your files to floating point
(tiff or exr).

Kind regards,

New House Internet Services BV
Joost Nieuwenhuijse

-----------------------------------------------
PTGui - Photo Stitching Software

www.ptgui.com
For support see: http://www.ptgui.com/faq/
-----------------------------------------------

On 02/12/15 01:41, seba...@unity3d.com wrote:
> Hi,
>
> Sorry to resurrect this old thread but I think there is a lack of
> informations and some misunderstanding :)
> (I am not the same Sébastien ;))
>
> We would like to setup a workflow to reconstruct the cleanest 360 HDR
> possible for image based lighting purpose.
> i.e we don't care about the artistic options, we care about the accuracy
> of the reconstruction.
> So we want to reconstruct clean linear values (and preventing glare as
> much as possible) and have no clipped value at all.
>
> We use our own conversion from RAW format to TIFF for various purpose
> (some preprocess) and we do it
> with dcraw because it have been prove to be more linear than ACR
> (http://mikeboers.com/blog/2013/11/07/linear-raw-conversions
> <http://mikeboers.com/blog/2013/11/07/linear-raw-conversions>).
>
> However after this pre-process step we would like to use PTGui for
> stitching and HDR reconstruction.
> Our current trouble is that when we input our linear 16bit TIFF image to
> PTGui it automatically consider that this TIFF is in sRGB, exactly like
> if we provide a JPEG.
> This is a problem for us because our TIFF image is in linear RGB, not in
> sRGB.
> PTGui perform the conversion from sRGB to linear on our TIFF file, then
> convert to HDR which is wrong. This has been confirm by using Nuke to
> transform our TIFF to sRGB before feeding it to PTGui (even if it make
> no sense here).
>
> So our question, how can we tell to PTgui that our input image is
> already in linear format ?
>
> Thanks
> <http://fnordware.blogspot.de/2008/05/making-linear-icc-profile.html>
>
> Erik Krause
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui" group.
> To post to this group, send email to pt...@googlegroups.com
> To unsubscribe from this group, send email to
> ptgui+un...@googlegroups.com
> Please do not add attachments to your posts; instead upload your files
> at a file sharing site (for example http://ge.tt/ ) and include a link
> in your message.
> For more options, visit this group at http://groups.google.com/group/ptgui
>
> ---
> You received this message because you are subscribed to the Google
> Groups "PTGui Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptgui+un...@googlegroups.com
> <mailto:ptgui+un...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

seba...@unity3d.com

unread,
Dec 2, 2015, 9:44:05 AM12/2/15
to PTGui Support
alright, 

thanks for the confirmation.

too bad that it is the default behavior as dcraw export linear 16bit TIFF only, but we will deal with it.

Cheers

Seb
Reply all
Reply to author
Forward
0 new messages