How to match the SOOC JPEG with RawTherapee

Joined
Jun 8, 2019
Messages
238
I like to start my RAW editing process with an image that closely matches the JPEG output of the camera. Since RawTherapee introduced the "Auto-Matched Tone Curve" feature, it has become pretty easy to come fairly close to the SOOC image, but I noticed certain colours (especially highly saturated blue) would still be rendered a bit differently, and the tone-curve matching algorithm seems to have problems when your input has blown highlights.

After a while, I found out that you can get a closely matching image by using a DCP profile. This is how I did it:
  1. Get one or more DCP profiles for your camera by copying it from the Adobe DNG Converter. Instructions on getting these profiles can be found here: https://rawpedia.rawtherapee.com/How_to_get_LCP_and_DCP_profiles
  2. You can save the .dcp files for your camera anywhere and use them by opening the Color tab, clicking Color Management and then manually select the DCP profile. However, you'd have to do this manually for every photo. I prefer to have this done automatically, so I copied my favourite profile (Panasonic DMC-G8 Camera Standard.dcp) to the "dcpprofiles" directory (on Linux: ~/.config/RawTherapee/dcpprofiles; for other platforms, see https://rawpedia.rawtherapee.com/File_Paths). I had to rename the file to "Panasonic DMC-G80.dcp" for RawTherapee to pick it up (it will automatically look for files that have the same name as the camera model in the EXIF info). After doing this, the option "Camera-specific color profile" will be selected for images made with this camera.
  3. Now to match the SOOC JPEG almost perfectly, you will have to adjust a few settings: use the DCP's tone curve, use neutral exposure settings in the Exposure module, enable distortion correction, disable vignetting correction (if it's off on your camera as well) and enable CA correction. I created a PP3 profile for this:
    Code:
    [Exposure]
    Auto=false
    
    [HLRecovery]
    Enabled=true
    Method=Blend
    
    [LensProfile]
    LcMode=lfauto
    UseDistortion=true
    UseVignette=false
    UseCA=true
    
    [Color Management]
    ToneCurve=true
    ApplyLookTable=true
    ApplyBaselineExposureOffset=true
    ApplyHueSatMap=true
    DCPIlluminant=0
    
    [RAW]
    CA=true
  4. To have the above PP3 profile be applied automatically for every image, save it in the profiles directory (~/.config/RawTherapee/profiles). I have called it "DCP tone curve without vignette corr.pp3". Then in RawTherapee's settings, set the standard profile for RAW files to this profile.
Notice I said "almost perfectly" in step 3. There may still be differences, like noise reduction (which is not enabled with the above profile). I don't like the camera's noise reduction anyway, and prefer to just enable it for images that really need it. But hey, it's a difference. You may also notice that the distortion correction might give a bit different result than what the camera does (in my experience, it's usually better in RawTherapee). But most of the time, the images look identical to me.

I hope this helps anyone. If you try it and/or think I've left out anything important, let me now.
 
Joined
Jun 8, 2019
Messages
238
  • Thread Starter Thread Starter
  • #5
One thing I hadn't mentioned: trickery like "i.Dynamic" is turned off on my camera. If it's turned on, the JPEG will be of course be different from what you get in RawTherapee with the above steps.
 

va3pinner

Mu-43 Regular
Joined
Jul 14, 2020
Messages
34
Thank you for this post! It will be a huge help to me. I have a Panasonic G9 and will try to find tie info I need to set this up.
It would be nice if I could do something similar with Darktable.
 

oldracer

Mu-43 Hall of Famer
Joined
Oct 1, 2010
Messages
2,650
Location
USA
I like to start my RAW editing process with an image that closely matches the JPEG output of the camera. ...
Just curious: why? I record both JPG and RAW but never look at the JPGs except in Windows Explorer and then only to identify the file name so I can copy the RAW somewhere. Really for me they are a waste of disk space. Obviously not for you.
 
Joined
Apr 20, 2020
Messages
1,143
Location
Beaumaris, Melbourne, Australia
Just curious: why? I record both JPG and RAW but never look at the JPGs except in Windows Explorer and then only to identify the file name so I can copy the RAW somewhere. Really for me they are a waste of disk space. Obviously not for you.
You're not alone there! I've noticed that many people do this.

However, I use RAWs and JPEGs for quite different purposes.

I only ever use the RAW file as a starting point for printing or other significant editing.

Almost all the photos on my web site and here are automatically post-processed from the OoC JPEG.
 

cjoliprsf

Mu-43 Regular
Joined
May 28, 2019
Messages
159
Location
Quebec, Canada
Real Name
Claude
Just curious: why? I record both JPG and RAW but never look at the JPGs except in Windows Explorer and then only to identify the file name so I can copy the RAW somewhere. Really for me they are a waste of disk space. Obviously not for you.
There are a few things here...
1st, one doesn't need to record both RAW and JPG for the above to work. If I understand correctly, it uses the JPG image that is imbedded in the raw file.

Now on the question of waste of space to record both, here is my take on this... I record both, but I am far from being expert on RAW editing with rawtherapee. In the beginning I used to work first on the RAW file, only to find after some work that my finished work wasn't as good as the SOOC JPG!

So I changed my strategy. I now first work on the JPG in rawtherapee, and for a good 80% of my photos just simple ajustments yield a finished image to my liking. For these, I then delete the RW2 file, and only keep the original SOOC JPG and the PP3 processing file as archive.

The other 20% of my photos are usually those that have more dynamic range, dark corners where I want to seek details, or other reason that make me want to use the RAW. I then work on the RW2 file in rawtherapee and will delete the original JPG.
 
Joined
Jun 8, 2019
Messages
238
  • Thread Starter Thread Starter
  • #10
Just curious: why? I record both JPG and RAW but never look at the JPGs except in Windows Explorer and then only to identify the file name so I can copy the RAW somewhere. Really for me they are a waste of disk space. Obviously not for you.
I try to match the JPEG output of the camera because:
  • I like it. The colours and contrast are usually just what I want, so why change it? Having a profile that mimics this reduces processing time (because I only have to focus on things like lifting shadows and adjusting white balance; the rest is good already).
  • I am colour-blind, so whenever a RAW editor does something I don't like, I am afraid to "fix it by eye" because I might mess up the colours. Panasonic's Standard profile gives me colours that look similar to what I saw in reality, so as long as I keep those I'm confident that I'm not messing things up.
And like you, I never actually use the JPG file that comes out of the camera. I just process everything from RAW, but I use the above procedure to have a good starting point.

If I understand correctly, it uses the JPG image that is imbedded in the raw file.
No it does not. It works purely based on the RAW data.

In the beginning I used to work first on the RAW file, only to find after some work that my finished work wasn't as good as the SOOC JPG!

...

So I changed my strategy. I now first work on the JPG in rawtherapee, and for a good 80% of my photos just simple ajustments yield a finished image to my liking.
With the steps I have written down in my initial post, you can work from RAW and still have an output that looks as good as the SOOC JPEG. You can have the same workflow for all images (and do not have to decide whether you work from the JPEG or from the RAW). Editing from JPEG is always suboptimal because you are applying at least one extra lossy compression step (one is done by the camera, the other one when you export the image from RawTherapee to JPEG). I would also never delete the RW2 file.
 
Last edited:

cjoliprsf

Mu-43 Regular
Joined
May 28, 2019
Messages
159
Location
Quebec, Canada
Real Name
Claude
Editing from JPEG is always suboptimal because you are applying at least one extra lossy compression step (one is done by the camera, the other one when you export the image from RawTherapee to JPEG).
Yes, I know you are right in theory. However the jpg compression on the SOOC JPG is 98, so "almost" lossless. I usually export my JPGs with a compression of 80 or 85. Hence starting from a JPG at 98 is in practice impossible to differenciate from starting with a lossless file.
 

threeOh

Mu-43 Regular
Joined
Aug 22, 2019
Messages
136
Yes, I know you are right in theory. However the jpg compression on the SOOC JPG is 98, so "almost" lossless. I usually export my JPGs with a compression of 80 or 85. Hence starting from a JPG at 98 is in practice impossible to differenciate from starting with a lossless file.
I believe there is no standard measurement for jpeg compression. That’s why some editors save jpegs at modest compression levels yet yield large file sizes. While others (Adobe) with higher indicated compression levels result in lower file sizes. If jpeg file sizes are lower than RAW, there is data missing, there is compression. I doubt its all empty bits and bytes to get to lossless.
 
Joined
Apr 20, 2020
Messages
1,143
Location
Beaumaris, Melbourne, Australia
Yes, I know you are right in theory. However the jpg compression on the SOOC JPG is 98, so "almost" lossless. I usually export my JPGs with a compression of 80 or 85. Hence starting from a JPG at 98 is in practice impossible to differenciate from starting with a lossless file.
Claude, the degree of JPEG compression SooC depends on the camera settings and brand.

With an Olympus camera, a LSF JPEG is full dimensions, but compressed 2.7:1. A LF/LN jpeg is also full dimensions, but compressed 4:1. Other sizes have increasing degrees of size reduction, and different compression ratios. Look in the back of the user manual for precise values.

The JPEG preview embedded in the RAW file has the hell compressed out of it.

One of a number of reasons why I shoot RAW + LSF JPEG is that the camera will preferentially display the JPEG, and it is better for reviewing images because of this.
 

cjoliprsf

Mu-43 Regular
Joined
May 28, 2019
Messages
159
Location
Quebec, Canada
Real Name
Claude
Claude, the degree of JPEG compression SooC depends on the camera settings and brand.
Yes, I am aware of this.
I use a GX85 and a GM5, and both give me 98 when I ask for the best quality for the JPG. I don't know how this relates to the compression ratio that you mention. This compression number is I think written in the EXIF data. My image viewer tells me what it is.
Considering that 100 is lossless, there really is very little loss at 98. I doubt that anyone could tell the difference.
 

threeOh

Mu-43 Regular
Joined
Aug 22, 2019
Messages
136
Yes, I am aware of this.
I use a GX85 and a GM5, and both give me 98 when I ask for the best quality for the JPG. I don't know how this relates to the compression ratio that you mention. This compression number is I think written in the EXIF data. My image viewer tells me what it is.
Considering that 100 is lossless, there really is very little loss at 98. I doubt that anyone could tell the difference.
Run that jpeg through other editors, make no changes, save as at 98. You will very likely get a different file size. The 98 is a scale determined by Panasonic. I’m on a Mac. If I save a jpeg at 98% using Graphic Converter I get a substantially larger file than I’d get saving the same file at 98% using Lightroom. I also shoot a GX85. As well as a GM1. The jpegs lack headroom. I’ve seen artifacts on sooc jpegs from these cameras by simply pushing in-camera adjustments made available by Panasonic. I assume because too much data got lost in compression.

jpegs have their place. But they cannot fill the role raw files provide if IQ is the criteria.
 

cjoliprsf

Mu-43 Regular
Joined
May 28, 2019
Messages
159
Location
Quebec, Canada
Real Name
Claude
Run that jpeg through other editors, make no changes, save as at 98. You will very likely get a different file size. The 98 is a scale determined by Panasonic. I’m on a Mac. If I save a jpeg at 98% using Graphic Converter I get a substantially larger file than I’d get saving the same file at 98% using Lightroom. I also shoot a GX85. As well as a GM1. The jpegs lack headroom. I’ve seen artifacts on sooc jpegs from these cameras by simply pushing in-camera adjustments made available by Panasonic. I assume because too much data got lost in compression.
Yes I would tend to agree that programs and cameras don't have all the same implementation of the quality factor, and some might compress more than others at the same quality number.

The main point I wanted to make however, is that for most pictures that are correctly exposed, don't have excessive dynamics, nor bleached highlights, the SOOC JPG at quality number of 98 is I think quite adequate as a starting point. And for when there is a need, the RW2 file is there.
 

barry13

Mu-43.com Editor
Joined
Mar 7, 2014
Messages
10,094
Location
Southern California
Real Name
Barry
FWIW, I use the Adobe profiles that come with their free RAW program, copying them into RT.

They don't match Olympus exactly, but there's less color shift than the default RT profiles. The most I usually do with color adjustments is changes in saturation or pastels & vibrance (iirc).
 

Latest posts

Links on this page may be to our affiliates. Sales through affiliate links may benefit this site.
Mu-43 is a fan site and not associated with Olympus, Panasonic, or other manufacturers mentioned on this site.
Forum post reactions by Twemoji: https://github.com/twitter/twemoji
Copyright © 2009-2019 Amin Forums, LLC
Top Bottom