Project

General

Profile

Bug #9940

The '-s' option of dt-curve-tool does not work.

Added by Cherrot Luo over 5 years ago. Updated about 2 months ago.

Status:
Closed: invalid
Priority:
Low
Assignee:
Category:
-
Target version:
-
Start date:
05/04/2014
Due date:
% Done:

0%

Estimated time:
Affected Version:
git development version
System:
Ubuntu
bitness:
64-bit
hardware architecture:
amd64/x86

Description

I have followed the guideline in https://github.com/darktable-org/darktable/tree/master/tools/basecurve to generate tone curve / base curve for my Nikon D7000. It worked fine for a single raw file ( using dt-curve-tool or dt-curve-tool-helper ). However, when supplying '-s' option for dt-curve-tool processing multiple raw files (in order to generate a better curve profile), I got a all 0 output, which cause a pure black output :(

Is there anyone having the same problem?

History

#1 Updated by Edouard Gomez over 5 years ago

We recently fixed a bug in PPM header parsing. The failure in parsing the header was getting through the error checks and resulted in flattened curves. It looks very similar to your problem, though this was also true for a single image, which is not your case. The fix is available in my branch at the moment:
https://github.com/edgomez/darktable.git

Can you first give this branch a try, and report back if it now works for you ?

#2 Updated by Edouard Gomez over 5 years ago

  • % Done changed from 0 to 10
  • Status changed from New to Confirmed

Confirmed on my branch as well.

I'll investigate as soon as i have a little bit of free time.

#3 Updated by Edouard Gomez over 5 years ago

  • % Done changed from 10 to 50
  • Status changed from Confirmed to In Progress

Hehe,

I fell into a simple trap :-D the last run was performed w/o the -s option resulting in a flat line.

You have to perform:
dt-curve-tool -s the.state.filename.you.have.chosen -z -e a.valid.image.nef -n 16

If you forget the -s option, then it results in a flat line.

Can you make sure this was also the error for you ?

#4 Updated by Cherrot Luo over 5 years ago

Edouard Gomez wrote:

Hehe,

I fell into a simple trap :-D the last run was performed w/o the -s option resulting in a flat line.

You have to perform:
dt-curve-tool -s the.state.filename.you.have.chosen -z -e a.valid.image.nef -n 16

If you forget the -s option, then it results in a flat line.

Can you make sure this was also the error for you ?

I didn't get what your point is. (Sorry for my poor English...)
Did you mean you forget specify the output file name for '-s' option?
What I've run is :
dt-curve-tool -s basecurve.dat ppmOfRaw_N.ppm ppmOfJpg_N.ppm

the ppm data of the raw and jpg has already been generated before this command.

I'll checkout your branch when I get home to confirm if the issue remains :)

#5 Updated by Edouard Gomez over 5 years ago

The basecurve.dat and tonecurve.dat files are not save states files. They are generated only to be used with the gnuplot scripts plot.(basecurve|tonecurve).

As shown throughout the README file, always use the -s option w/ the same save state filename when accumulating stats and computing the curve in the final -z tool call.

Just an example to illustrate that:

$ dt-curve-tool -s savestate.bin image-16-1.ppm image-8-1.ppm
$ dt-curve-tool -s savestate.bin image-16-2.ppm image-8-2.ppm
$ dt-curve-tool -s savestate.bin image-16-3.ppm image-8-3.ppm
$ dt-curve-tool -s savestate.bin -z -e image-3.nef -n 16

Or alternatively for Nikon files, you can use the helper script:

$ dt-curve-tool-helper -q image-1.nef
$ dt-curve-tool-helper -q image-2.nef
$ dt-curve-tool-helper -q image-3.nef
$ dt-curve-tool -z -e image-3.nef -n 16 # default save state filename was used in all calls

#6 Updated by Cherrot Luo over 5 years ago

Edouard Gomez wrote:

The basecurve.dat and tonecurve.dat files are not save states files. They are generated only to be used with the gnuplot scripts plot.(basecurve|tonecurve).

As shown throughout the README file, always use the -s option w/ the same save state filename when accumulating stats and computing the curve in the final -z tool call.

Just an example to illustrate that:
[...]

Or alternatively for Nikon files, you can use the helper script:
[...]

I got it. I'll try it and post the result here later :)

BTW, in dt-curve-tool-helper what it executing is `dt-curve-tool "$PPM16" "$PPM8"`, without '-s' option by default. Are you sure the alternative for Nikon could work as expected?

#7 Updated by Cherrot Luo over 5 years ago

Cherrot Luo wrote:

Edouard Gomez wrote:

The basecurve.dat and tonecurve.dat files are not save states files. They are generated only to be used with the gnuplot scripts plot.(basecurve|tonecurve).

As shown throughout the README file, always use the -s option w/ the same save state filename when accumulating stats and computing the curve in the final -z tool call.

Just an example to illustrate that:
[...]

Or alternatively for Nikon files, you can use the helper script:
[...]

I got it. I'll try it and post the result here later :)

For convenience I run:

find . "*.NEF" -exec dt-curve-tool-helper -q {} \;
dt-curve-tool -z -e OneOfTheRawFile.NEF -n 16

It indeed generate a much better tone curve & base curve! Thanks for your explanation for that!

BTW, in dt-curve-tool-helper what it executing is `dt-curve-tool "$PPM16" "$PPM8"`, without '-s' option by default. Are you sure the alternative for Nikon could work as expected?

# default save state filename was used in all calls

I got that, thanks indeed :)

#8 Updated by Edouard Gomez over 5 years ago

  • % Done changed from 50 to 0
  • Status changed from In Progress to Closed: invalid

Good to hear this was in the end not a bug.

I'm now closing the issue.

#9 Updated by arun saini about 2 months ago

This will be easy to follow for every one when we http://fixwindows10connections.com try to open the how to fix connections for bluetooth audio devices and wireless displays in windows 10.

Also available in: Atom PDF

Go to top