I bought the 16 MP autofocus module and the 16 MP IR module and they arrived last week. Yesterday I even got my RaspberryPi and I assembled everything. Sadly the IR module has no autofocus.
As I’m a completely newbie in the RaspberryPi camera world I would welcome any good hints and links. Especially because Raspberry switched from there old camera stack to libcamera and a lot of tutorials I fond no longer work.
Here are the first images of the 16 MP autofocus module:
JPEG created with libcamera-jpeg --autofocus -f --keypress -o test.jpeg:
Thanks for sharing. There are multiple issues w/ this DNG, please report upstream (RPi and/or libcamera). Rawspeed throws an “Two IFD’s overlap. Raw corrupt!” exception:
Entirely superfluous IFD1 (the cause of this exception, overlaps w/ ExifIFD)
Superfluous Compression, StripOffsets and StripByteCounts tags in the ExifIFD (already recorded by IFD0 and SubIFD as mandated by TIFF/EP, i.e. DNG, which overlaps w/ Exif)
I opened test.dng in rawproc, libraw handled it okay except for finding camera primaries, probably attributable to the IFD issue. Exiftool did find a D65 ColorMatrix1, so I converted those floats to int * 10000:
12557,-5508,-1511,-5071,13427,1279,-776,664,5880
Pasted those numbers into the colorspace:assign tool and processed the image like this:
The ColorMatrix1 tag looks fine in principle, you might want to lift the “10000 denominator” restriction in your implementation (i.e. read both numerator and denominator and do the actual division):
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.
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.
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…