Kalpanika / x3f

Tools for manipulating X3F files from Sigma cameras
86 stars 28 forks source link

Add monochrome output #70

Open rolkar opened 9 years ago

rolkar commented 9 years ago

There are three methods for monochrome ouput.

  1. Dump all three layers, with optional denoising and gamma coding, without converting to RGB and then let the user do whatever mixing he wants in Photoshop or Lightroom.
  2. Make one monochrome image, mixing the RAW layers, depending on switches.
  3. Making one monochrome image, mixing converted RGB image, depending on switches.

Note that 2 and 3 are essentially the same thing (if you can have negative values in mixing), it is just a mental difference.

erikrk commented 9 years ago
  1. This is the easiest to implement. "-color none" almost does it. What's missing is rescaling and gamma. An advantage with this approach is that it gives the user the possibility to adjust the mixing interactively in e.g PS or LR. Note that this possibility already exists with DNG by selecting the "Unconverted" camera profile, but as I understood it some people want to use TIFF.
  2. This could also be done, but with a little more coding. In this case the mixing has to be given to x3f_extract and can't be adjusted interactively in an editor.
  3. This is generally a bad idea. It will lead to more noise. The RGB image could also be clipped.

On mié, 2015-08-05 at 05:45 -0700, Roland Karlsson wrote:

There are three methods for monochrome ouput.

 1. Dump all three layers, with optional denoising and gamma
    coding, without converting to RGB and then let the user do
    whatever mixing he wants in Photoshop or Lightroom.
 2. Make one monochrome image, mixing the RAW layers, depending on
    switches.
 3. Making one monochrome image, mixing converted RGB image,
    depending on switches.

Note that 2 and 3 are essentially the same thing (if you can have negative values in mixing), it is just a mental difference.

— Reply to this email directly or view it on GitHub.

rolkar commented 9 years ago
  1. Yes, it is the easiest to implement. The "Unconverted" camera profile I have missed. And I do not think it is displayed in the switches help. Why does Unconverted profile not work for TIFF?
  2. OK
  3. My assumption was that this is only sugar for 2. The same computations as 2 are made. It is just that you can give the parameters as mixing RGB instead. That would add no noise or clipping.

/Roland

On 2015-08-05 15:04, Erik Karlsson wrote:

  1. This is the easiest to implement. "-color none" almost does it. What's missing is rescaling and gamma. An advantage with this approach is that it gives the user the possibility to adjust the mixing interactively in e.g PS or LR. Note that this possibility already exists with DNG by selecting the "Unconverted" camera profile, but as I understood it some people want to use TIFF.
  2. This could also be done, but with a little more coding. In this case the mixing has to be given to x3f_extract and can't be adjusted interactively in an editor.
  3. This is generally a bad idea. It will lead to more noise. The RGB image could also be clipped.

On mié, 2015-08-05 at 05:45 -0700, Roland Karlsson wrote:

There are three methods for monochrome ouput.

  1. Dump all three layers, with optional denoising and gamma coding, without converting to RGB and then let the user do whatever mixing he wants in Photoshop or Lightroom.
  2. Make one monochrome image, mixing the RAW layers, depending on switches.
  3. Making one monochrome image, mixing converted RGB image, depending on switches.

Note that 2 and 3 are essentially the same thing (if you can have negative values in mixing), it is just a mental difference.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/Kalpanika/x3f/issues/70#issuecomment-127991533.

erikrk commented 9 years ago
  1. "Unconverted" is not displayed in the switches since there is no switch for it. It always gets dumped to the DNG file. You select camera profile when you process the DNG e.g in ACR or LR. There are also three (arbitrarily chosen) mixes for monochrome available. With TIFF, it doesn't work because TIFF doesn't support profiles that contain conversion matrices.
  2. Yes, if you convert directly from raw without actually generating an RGB image, there will obviously be no clipping issues. There will still be increased noise though. It's caused by the presence of big positive and negative coeficients, i.e. cancellation of signal and accumulation of noise. This is unavoidable if you want the express the mixing in terms if RGB, but some users might want to do it anyway. I did some experimentation on this a while ago with Merrill. If you mix RGB (1/3, 1/3, 1/3) you get acceptable results as long as you do denoising. Without denoising it's disastrous. If you mix the raw channels (1/3, 1/3, 1/3) instead, you get acceptable results without denoising and with denoising it becomes better.

On mié, 2015-08-05 at 06:18 -0700, Roland Karlsson wrote:

  1. Yes, it is the easiest to implement. The "Unconverted" camera profile I have missed. And I do not think it is displayed in the switches help. Why does Unconverted profile not work for TIFF?
  2. OK
  3. My assumption was that this is only sugar for 2. The same computations as 2 are made. It is just that you can give the parameters as mixing RGB instead. That would add no noise or clipping.

/Roland

On 2015-08-05 15:04, Erik Karlsson wrote:

  1. This is the easiest to implement. "-color none" almost does it. What's missing is rescaling and gamma. An advantage with this approach is that it gives the user the possibility to adjust the mixing interactively in e.g PS or LR. Note that this possibility already exists with DNG by selecting the "Unconverted" camera profile, but as I understood it some people want to use TIFF.
  2. This could also be done, but with a little more coding. In this case the mixing has to be given to x3f_extract and can't be adjusted interactively in an editor.
  3. This is generally a bad idea. It will lead to more noise. The RGB image could also be clipped.

On mié, 2015-08-05 at 05:45 -0700, Roland Karlsson wrote:

There are three methods for monochrome ouput.

  1. Dump all three layers, with optional denoising and gamma coding, without converting to RGB and then let the user do whatever mixing he wants in Photoshop or Lightroom.
  2. Make one monochrome image, mixing the RAW layers, depending on switches.
  3. Making one monochrome image, mixing converted RGB image, depending on switches.

Note that 2 and 3 are essentially the same thing (if you can have negative values in mixing), it is just a mental difference.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/Kalpanika/x3f/issues/70#issuecomment-127991533.

— Reply to this email directly or view it on GitHub.