Strange pixels from Rawsie dng

I am getting this artifact from a Rawsie dng file and I am curious of what it can be. I got two other samples sent to me (Rawsie is only working in OS X) from a R5 but at ISO 1600 and 6400. Much worse because not only the optical black field was affected but also the shadows in the picture.

Only green and blue pixels affected.

The original file is from raw.pixls.us https://raw.pixls.us/getfile.php/4694/nice/Canon%20-%20Canon%20EOS%20R5%20-%203:2.CR3

To inspect the optical black field, go to raw black/white points, hambruger menu and passthrough.
Canon - Canon EOS R5 - 3_2.dng (16.4 MB)

PGM file created from dcraw doesn’t show any strange pixels in the optical black field
dcraw -E -4 -j -t 0 -s all filename.dng

2_0.7z (17.1 MB)

Rawsie looks to be closed source, and DNGs, ad we know, are a minefield. You should bring this issue with their DNG file up to them.

And of course: please don’t delete your original raw files. They’re artifacts from your camera and should be treated as such. This goes quadruple for closed source software that makes a claim but offers no source so you can see what its doing to your files. Too many horror stories of “oh I used adobe DNG converter but it turns out that years later there was a bug in it and my original raw files are long since deleted.” This rawsie is in the same category.

1 Like

What do you think is the cause of the pixels in darktable but not dcraw?

I already know the story of the first version of Adobe’s DNG converter that erased optical black area. Or the last version that changed the colour matrix for Leica Q2.

Hi Peter,
I am not addressing your original question but just wondering why you are converting the canon raw file to DNG. Is the R5 file not supported in your editing software?

I don’t own any R5 and I don’t own any computer with OS X. I own a 1Ds that I thought RawTherapee supported, but that is not the question here but in the other thread.

I do like to compare things. For example Canon raw vs craw is easily seen in the optical black field.

What I found this far is that black/white level changes and it also looks strange in clipped highlights. And of course the dots, but that may be a darktable thingy.

Are you saying compressed raw is not as good as full raw. Forgive my deviation from your original post.

About raw (compressed) vs craw (lossy compressed) in CR3 format? Worth a new thread.


Indeed, still there after one disables all the modules possible and switches demosaic to passthrough as well:

unprocessed_raw dump to PGM/TIFF from the LibRaw package also does not show them…

However, reading in Python using tifffile does show some non-zero data there as well.

I now also see LinearizationTable in this file - could it be that RawSpeed is passing the entire buffer through the table which makes these pixels more visible, while dcraw/LibRaw only applies it to the active area? @LebedevRI

Also, Software : Dotphoton Raw 20210916 indicates this has undergone another proprietary lossy compression scheme, so no wonder shadows are different to the original CR3. And we also don’t know if and what that proprietary compression scheme did to those black areas.

2 Likes

It looks like it’s not that LUT application either - I just passed the tifffile uncompressed array incl. the black areas through it and the hot pixels are not there. Here’s a new comparison of

dt (RawSpeed) w/ black level set at 0 and crop removed, demosaic in passthrough:

tifffile + LUT saved as another 16b TIFF (so also no black level removal, no demosaic):

(and the same can be shown for LibRaw’s unprocessed_raw output)

There’s clearly non-zero data in the black areas in both cases, but hot pixels only w/ RawSpeed. @LebedevRI So potentially something might be up w/ the LJpeg decompressor or elsewhere in the DNG decoder?

Does the issue go away it you completely disable DNG opcode processing?
I’m aware of an, err, confusion as to what the DNG codes should do wrt the crop,
should they apply to the whole image, only the active area (i.e. crop), or whatnot.

There are no opcodes in this image, only the LinearizationTable…

Some more things:

5Ds R https://raw.pixls.us/getfile.php/2974/nice/Canon%20-%20EOS%205DS%20R%20-%20RAW%20(3:2).CR2

Canon - EOS 5DS R - RAW (3_2).dng (18.9 MB)

R6 https://raw.pixls.us/getfile.php/4662/nice/Canon%20-%20Canon%20EOS%20R6%20-%203:2.CR3

Canon - Canon EOS R6 - 3_2.dng (9.6 MB)

And a CC BY-NC 4.0 Deed | Attribution-NonCommercial 4.0 International | Creative Commons shared from Tony Wilhelmsson. ISO 1600 and dots in the active area when opened in darktable. I only got a black image in RawTherapee 5.9 from this file.
Canon EOS R5-20210716-_18A5489.dng (13.4 MB)

Some findings at Dpreview.

Lossy compression Compressing raw: Open Talk Forum: Digital Photography Review

From two of the devs Dotphoton Raw / 'Rawsie' - any opinions on this raw compression witchcraft?: Photographic Science and Technology Forum: Digital Photography Review

“Indeed, we use the lossless JPEG coder already present in the DNG SDK. Coding is done over the native bit-depth of the camera (DNG supports up to 16 bits). The way that we achieve better results is that we calibrate each individual camera, at each iso and most shutter speed, in the lab. From that we generate custom coding per camera and per iso. The quality is not bit-for-bit lossless, but the error generated with respect to the noise is approximately 1/10th of that of lossy JPEG at the same file size.”

That LinearizationTable is weird.


I’m guessing we are somehow supposed to infer that
there are actually 4 LUT’s there, one per CFA’s color.

Eh, no, i guess that is not it?
I was thinking it was due to the dithering during the LUT application,
but that does not seem to be the case. I think, we are on a wild goose chase.
AFAIU, that “software” is trying to minimize the filesize, by smartly re-encoding
the data, in non-lossless way. But do we know that they are trying to preserve
the whole image, or only the active area of the image? If you are optimizing
for size, it makes little sense to preserve the black areas, so i’m not exactly sure
that those artefacts in the black areas aren’t intentional.

ISO 1600 raw file uploaded here shows in active area too.

It doesn’t explain that they don’t occur w/ LibRaw’s or tifffile’s (imagecodec that is) ljpeg decoders…

After looking again, of course, that was old good

Nice. And this table doesn’t need to be interpolated, there are as many entries as there are uncompressed values.

As far as i can tell,

and

address all visual glitches.

1 Like

propagated to darktable:

2 Likes