Author Topic: RAW Format problem  (Read 2876 times)

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
RAW Format problem
« on: 2016 January 18 08:27:43 »
Hi,
Why result 1 and 2 is not equal?
See picture in attachment.
1 is direct Cr2 to RGB conversion.
2 is Cr2 to RawBayerCFA to RGB.
In both ways, 1 and 2, settings is equal. no black/highlight/flip correction. white balance unchecked.
How to check which module produce wrong result?

Best regards,
Nikolay.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: RAW Format problem
« Reply #1 on: 2016 January 19 05:56:46 »
Both are valid linear, interpolated versions of the same raw data. By default, dcraw multiplies each channel of the image by the corresponding daylight multiplier when it interpolates the data. Daylight multipliers are written to the console each time a DSLR raw image is loaded. Of course, the data are not scaled when they are not interpolated (both create raw Bayer... options in DSLR RAW Preferences). The Debayer tool does not apply any scaling operation, which explains the difference you are observing.

To verify this statement, apply an STF AutoStretch function to both images with unlinked channels: the result should be virtually identical. For a more thorough verification, use the LinearFit tool between both interpolated results. For all channels, the quotients between the fitted line slopes and their corresponding daylight multipliers should be constant (up to 16-bit numerical precision, that is up to about 5 significant digits).

I am thinking on adding a new option to DSLR_RAW preferences to disable dcraw's automatic scaling. Actually, to achieve this, a custom white balance must be specified with the following dcraw arguments: "-r 1 1 1 1". I'll add this option to the next version of the DSLR_RAW module.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: RAW Format problem
« Reply #2 on: 2016 January 19 20:04:36 »
multiplier in poor 16bit integer spaces. oh...
Juan, please add option "-r 1 1 1 1" as fast as possible.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: RAW Format problem
« Reply #3 on: 2016 January 22 06:13:14 »
Hi Nikolay,

Version 1.3.2 of the DSLR_RAW module has been just released, with this option implemented (besides more things).
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: RAW Format problem
« Reply #4 on: 2016 January 22 06:31:18 »
 :)