• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

dng_validate and after stage 3

New Here ,
Apr 12, 2019 Apr 12, 2019

Copy link to clipboard

Copied

Hi Adobe,

I've read the SDK and have a DNG file I've created and have the following question:

I can use dng_validate with the "-3" option to output the de-bayered image and it looks as "it should" (meaning no noise, proper exposure).

But, if I let it continue past stage 3, the image is significantly brighter and consequently noisier.

My question is: what operation(s) happen after stage 3?

Cheers.

Matt

Views

1.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 13, 2019 Apr 13, 2019

Copy link to clipboard

Copied

The best way to understand the difference between a stage three image and a final image is to tale a look in the SDK's dng_render_task code, which is what does most of the work.

But mostly it's the tone curve, look tables, huesatmap, some other adjustments such as baseline exposure. If you're looking at a simple DNG (one without tables), it's likely that most of the difference is the tone curve and the baseline exposure.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 13, 2019 Apr 13, 2019

Copy link to clipboard

Copied

Excellent information! thank you!

I will review the SDK render function for better understanding.

For context: the images are from machine vision cameras(JAI) 8bit raw, so I do  it know the baseline exposure so the exif doesn’t include that ( and from what I understand dependent on the ISO which video cameras do not have ). I’ll check the tone curve. The linearization table is just linear.

Thank you!

matt

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 13, 2019 Apr 13, 2019

Copy link to clipboard

Copied

FYI, generally for a CFA image, the DNG SDK will automatically add a default tone curve.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 17, 2019 Apr 17, 2019

Copy link to clipboard

Copied

I have a quick follow up:

I have disabled the gamma correct by returning identity for:dng_function_GammaEncode_2_2::Evaluate (as suggested in a different thread), and this exposure seems correct, but the data looks saturated, as if the RGB->sRGB calculation has already occurred (and the gamma as well).

Question: how can I completely disable the final color profile...what I really want it Stage3 which looks correct (complicated to explain why). Is there an No-op profile?

cheers.

Matt

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 18, 2019 Apr 18, 2019

Copy link to clipboard

Copied

LATEST

Disabling GammaEncode_2_2 is not a good idea. What that will actually do is to not correctly encode the data in the output image during the rendering process. So when the image is displayed, what you will be seeing is an Adobe tone curve layered on top of an inverse gamma 2.2 curve. Because an Adobe tone curve is not a 2.2 gamma curve, the result will simply be a mess rather than the linear result you want.

The correct way to handle this is in the raw processor, not in the DNG code. You can do two things:

1. If you're using e.g., LR to process the image, you could create a camera profile with a linear tone curve, and apply that.

2. You can use a raw processor that can be set to not apply tone curves. E.g., if you're on AccuRaw EXR (Mac only) simply untick the "Scene referred" box.

If you really want to mess with DNG_validate's code, the correct place is (probably, depending on what's actually in your DNG) dng_tone_curve_acr3_default. Or better, override tone curve processing in the render task. But I don't recommend either.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines