Bug 276883 - Add color curves correction in RAW demosaicing processing from BQM
Summary: Add color curves correction in RAW demosaicing processing from BQM
Status: CONFIRMED
Alias: None
Product: digikam
Classification: Applications
Component: BatchQueueManager-RAWProcessing (show other bugs)
Version: 2.0.0
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-01 11:59 UTC by Francesco Riosa
Modified: 2016-07-03 16:49 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
histmatch.py (17.23 KB, text/plain)
2011-07-01 11:59 UTC, Francesco Riosa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Riosa 2011-07-01 11:59:13 UTC
Created attachment 61527 [details]
histmatch.py

Version:           2.0.0 (using KDE 4.6.4) 
OS:                Linux

A Feature that could be really interesting to have is to apply to raw files the operations the camera would have used to create the jpeg.

To make this possible cameras save in exif binary chunk of data, in scattered proprietary formats, thus making support of this feature to support very difficult outside programs of the vendor (i.e Nikon Capture NX)

There is another way, cameras often save preview and also full jpeg (nef 12 bit compressed fex) in the raw file, this file is worked by the camera and show evident differences to the raw.

The idea is to try to re-create the histogram of the jpeg onto the raw.
Fred Weinhaus did exactly that using imagemagick's `convert`
http://www.fmwconcepts.com/imagemagick/histmatch/index.php
The attached python script is a conversion of his histmatch bash one. The linked page has a good description of how it work.

There is a bug preventing images of different sizes to work, but as a proof of concept it should be enough ;)

it's called like
`histmatch.py -c luminance preview.jpg 16bit.png 16bit_out.png`
the "scatteer" script on the same site can be used to analize results.

While this approach can and should be perfected it has already good results

So it would be interesting to have a similar feature in the batch conversion

P.S. a way to make it better could possibly involve hald maps for 3d clut, need more investigation
P.P.S I'll look at this in depth after my short holidays i.e. after July 10

Reproducible: Didn't try



Expected Results:  
better camera/digikam match of produced images
Comment 1 Francesco Riosa 2011-07-13 19:38:13 UTC
*** Bug 277707 has been marked as a duplicate of this bug. ***
Comment 2 caulier.gilles 2012-12-21 12:10:21 UTC
Francesco,

The idea of this entry is very interesting. I would you like to see a C++ implementation which :

1/ extract JPEG preview from RAW (easy to do with libkdcraw API)
2/ Analyse JPEG image and compute settings to apply on RAW image data as post processing
3/ Perform post processing to RAW using standard Digikam filters

Are you interested to work on this project ?

Gilles Caulier