More Raspberry camera fun

Oh, exiftool did it for me, a nice set of floats.

I converted them to integers *10000 because that’s the dcraw format, and I had incorporated that ingest into rawproc, paste a comma-separated dcraw set instead of a color profile filename…

I understood that part (and that’s an Adobe “format” btw as DNGs from Adobe DNG Converter were the only source of profiles for dcraw and its derivatives historically…), but still doesn’t explain why it doesn’t work OOTB for your app, i.e. why libraw doesn’t provide you with the same set of floats as exiftool/exiv2?

Yeah, no kidding. I don’t want to hijack the thread, but this has given me pause to review what I’m pulling from the libraw-delivered data for color information. For this DNG, libraw delivers a RGB->camera matrix, but does not deliver a camera->XYZ which I think is what the metadata’s ColorMatrix1 is supposed to be.

Ah, but it does (or at least it should), check rawdata.color.cam_xyz[][]

For the DNGs posted in this thread, from cam_xyz I get zeros…

Some time ago, I incorporated libraw’s cam_xyz in my search for camera primaries, a last-resort after parsing dcraw’s adobe_coeff and RT’s camconst.json.

No idea, sounded like it should work:

Btw, did you check both color.cam_xyz[][] and rawdata.color.cam_xyz[][]?

Anyhow, different topic I guess…

Well, maybe not quite. The dng from this thread has what appears to be a valid ColorMatrix1, and libraw doesn’t process it. There’s a bit of conditional logic in the code you posted, and I’m running out of time this morning to work through it, but I’d surmise there’s something else missing from the RPi dng to compel libraw to use the ColorMatrix1…

Perhaps, sadly I won’t have time to build libraw in debug and step through it either any time soon…

No, the doc says “All other fields of this structure are for internal use and should not be touched by user code.” for rawdata, and my military time taught me to follow instructions… :crazy_face:

Peeking is not touching :smiley:

Okay, okay, put in a collection for rawdata.color.cam_xyz[][] , no joy from test3.dng…

I got the patches from ArduCam, forked libcamera-app and merged them with latest version:

This is the first test image (not very interesting content :stuck_out_tongue_winking_eye:) from this version and it opens in dt:
test4.dng (31.2 MB)

And here the first test image from the second camera module without the IR filter. (Sadly without auto focus.)

NoIR-test.dng (31.2 MB)
NoIR-test.dng.pp3 (11.5 KB) (Just a little white balance done in RawTherapee directly on the Raspberry Pi)

3 Likes