Recent comments

Reply to: Which black level should I trust?   8 years 2 months ago

Followup #3:

G9X-II samples from photographyblog all have Black Level about 2047-2050. Do you use some special mode (noise reduction??) on your camera?

UPD: also, these files do not show 'one of 4' histogram even for higher ISO (3200-6400-12800). Unfortunately, no samples with intermediate ISO (2000) in this site.

Reply to: Which black level should I trust?   8 years 2 months ago

And another request: could you please provide dark frame shot (lens caps on) with same exposure (1/80, ISO 2000)?

Reply to: Which black level should I trust?   8 years 2 months ago

Followup:

standard deviation value for black masked pixels is about 37 for this shot. So 5 lower bits (for 14-bit scale) are useless, difference between black at 2048 and 2044 to be masked under the noise.

Reply to: Which black level should I trust?   8 years 2 months ago

Thank you for the sample (I've checked only EOS cameras, will inspect G9X2 in more depth).

Here is histogram of masked pixels: https://www.dropbox.com/s/06nyv7dhu56n4i1/Screenshot%202017-03-25%2022.4...
(black subtraction turned off).
And here is the same histogram, but zoomed in: https://www.dropbox.com/s/d1grqdcl343tncj/Screenshot%202017-03-25%2022.5...

Please note, that only one value of 4 is used (so camera effectively 12 bit at this ISO).

With such high noise (screenshot #1, see histogram bell width) difference in one 'real' level is very hard to see in practice (and I do not see any visible difference between automatic black level and manual set to 2047 or 2048).

Reply to: Which black level should I trust?   8 years 2 months ago

Strange, that would explain why only I thought this was a problem. Here's the result from a burst I took (Canon G9 X II):

IMG_0293.CR2: black 2044, cblack 2 0 1 0
IMG_0294.CR2: black 2044, cblack 1 0 1 0
IMG_0295.CR2: black 2044, cblack 1 0 2 0
IMG_0296.CR2: black 2045, cblack 1 1 0 0
IMG_0297.CR2: black 2044, cblack 0 1 1 2
IMG_0298.CR2: black 2043, cblack 1 2 2 0
IMG_0299.CR2: black 2044, cblack 1 0 2 2
IMG_0300.CR2: black 2044, cblack 1 2 1 0
IMG_0301.CR2: black 2043, cblack 3 2 2 0
IMG_0302.CR2: black 2044, cblack 1 1 3 0
IMG_0303.CR2: black 2045, cblack 0 1 1 1
IMG_0304.CR2: black 2043, cblack 2 0 3 1
IMG_0305.CR2: black 2044, cblack 1 0 3 0
IMG_0306.CR2: black 2044, cblack 1 1 1 0
IMG_0307.CR2: black 2044, cblack 0 0 3 1
IMG_0308.CR2: black 2045, cblack 0 0 0 0
IMG_0309.CR2: black 2042, cblack 3 0 4 3
IMG_0310.CR2: black 2044, cblack 1 1 1 0
IMG_0311.CR2: black 2044, cblack 1 1 0 0
IMG_0312.CR2: black 2044, cblack 1 2 1 0
IMG_0313.CR2: black 2042, cblack 3 5 4 0

For what it's worth I took another burst just a couple of minutes later (same settings except higher ISO) and all these files in that burst have exactly "black 2049, cblack 0 0 0 0"

Here is IMG_0298.CR2 http://www.mediafire.com/file/b2xzd3tit3gww85/IMG_0298.CR2

Reply to: Which black level should I trust?   8 years 2 months ago

I've examined several samples (from latest cameras with approx. black level 2048) and I could not find any sample with black level below 2047 (LibRaw's value)

Could you please provide one?

Reply to: Which black level should I trust?   8 years 2 months ago

All cameras, we're talking about all cameras, well at least the modern ones, or at the very least the ones that are supposed to have a known offset, like Canon and 2048. There must be a good reason why you chose one method over the other, right? On the 0.17 release notes you wrote "LibRaw do not rely on hardcoded black levels", well, why not? Is it because hardcoded black levels are unreliable or is it because they can't be found for all camera models? That's what I'm asking, why did you choose to do it this way and not the "it's close to 512 or 2048 so let's set it to 512 or 2048" way? I think that's a pretty fundamental question.

Reply to: Which black level should I trust?   8 years 2 months ago

Very hard to tell 'which is closed to ideal' while discussing abstract matters.

What camera we're talking about? Could you please provide dark frames shot at same shutter speed/temperature/camera settings?

Reply to: Which black level should I trust?   8 years 2 months ago

Right, but the question remains, which is closer to ideal, the fixed 2048 offset or the measured black levels? Seems to me like using the masked pixels makes it quite prone to noise mostly at high ISOs, and that they deviate from the fixed offset in statistically insignificant ways (while the ideal offset might well remain the same), which is why I'm thinking the measured black levels should probably be disregarded entirely, except maybe as a hint of what the true fixed offset should be.

But since you're using the measured black levels instead then you must think that logic is wrong, this is what I'm asking about.

Reply to: Which black level should I trust?   8 years 2 months ago

Please note, that imgdata.color.black is only 'base' value with offsets stored in imgdata.cblack[], so final black level may be different.

For Canon cameras, LibRaw calculates black levels based on masked pixels.

Reply to: JPEG RAW Matching   8 years 2 months ago

LibRaw tries to extract as much as possible from RAW.
Other software (e.g. in-camera JPEG processor) may crop more or less (it also may depend on camera/raw processor settings, for example barrel distortion correction on/off).

So, pixel level RAW/JPEG match looks not possible in general case

Reply to: A question about "dcraw_make_mem_image"   8 years 2 months ago

Hi Alex,

Thanks for replying!

I actually used the conversion to "ushort *" right after posting the question. It seemed to work fine.

Have a nice day!

Mio

Reply to: A question about "dcraw_make_mem_image"   8 years 2 months ago

LibRaw is internally 16-bit unsigned int, so float conversion looks useless.
For 16-bit output just use explicit type conversion to (ushort*) for libraw_processed_image_t->data.

Reply to: Demosaicing of plain RGGB data   8 years 2 months ago

Thanks for quick response, I will try that.

Reply to: Chromatic Adaptation Matrix (CAT) question   8 years 2 months ago

There are as-shot WB coefficients (so diagonal adaptation matrix)

Reply to: Unpacking RAW without any processing using dcraw_emu   8 years 3 months ago

Awesome, thank you very much!

Jan

Reply to: Camera White Balance   8 years 3 months ago

From dcraw_emu, usage() call:
"-w Use camera white balance, if possible\n"

And, sure, it works.

Reply to: Unpacking RAW without any processing using dcraw_emu   8 years 3 months ago

There is no -d/-D keys in dcraw_emu

Use unprocessed_raw sample instead.

Reply to: Quesiton about "output_color=0"   8 years 3 months ago

Yes, you can set custom WB via user_mul. But for wrong WB demosaic results may be not good as expected.

dcraw_emu -o 0 -h works for me
(-o 0 translates to output_color=0, -h translates to half_size-1)

Reply to: Quesiton about "output_color=0"   8 years 3 months ago

Hi Alex,

From what you said, it seems like the "white balance" is necessary before normal demosaic. If a user want to supply her/his own white balance factors, it can still be done through "user_mul[i]", correct?

Also, when I use "output_color = 0" and "half_size = 1" together (regardless other parameter), the image seems to look strange. Can you take a look at it?

Thanks so much and have a nice day!

Reply to: Quesiton about "output_color=0"   8 years 3 months ago

Normal demosaic (not 'half' or 'linear interpolation') is useless without white balance first.

Reply to: Quesiton about "output_color=0"   8 years 3 months ago

Hi Alex,

I would like to use the RAW data without calling "dcraw_mem_image()"; however, there is still a need for demosaic. Currently, I have to use "dcraw_mem_image()" with the parameters listed before to get it as close as possible.

If there is a function that I can call to get the image data that only goes through demosaic step (with no other adjustment), that would be great!

Thanks,

Reply to: Quesiton about "output_color=0"   8 years 3 months ago

I'm still cannot understand what kind of data you need. You wrote 'close to', but could you please describe what you really need?

Reply to: Quesiton about "output_color=0"   8 years 3 months ago

What is 'converted image'? imgdata.image array, or result of dcraw_mem_image() call?

Pages