I’m working on a project to measure object brightness from photographs as accurately as possible.
The plan:
Load RAW sensor data.
Extract pixels from a region of interest and average them.
Convert to XYZ color space and use the Y channel as brightness.
Since I’m using Python, I rely on rawpy (a wrapper for LibRaw). My main concern is whether the way I open/process RAW files preserves true, unprocessed sensor values, so that my XYZ conversion is valid and not influenced by hidden processing.
I have been using dcraw a lot and now trying LibRaw because I have a camer that uses cr3 files. In LibRaw I am missing two main featerus that used to be pasrt of DcRaw.
1. The possibility to keep original capture date when converting to tiff (-z in DcRaw)
2. The option to assign a camera icc profile after linear conversion ( -p )
Have those options been removed for a specifif reason?
I'm unsure how and where to access processed image data after calling libraw_dcraw_process. I noticed that imgdata.image now has a valid pointer, but looking at the 4channels samples that suggests that this is just raw data (which I can and do currently access via imgdata.rawdata.raw_image). I've also looked at calling libraw_dcraw_make_mem_image which seems to create reasonable values in libraw_processed_image_t (width, height, etc., ) but just has data as a byte array (despite 16bit processed data) length=1 (libraw_types.h has ''unsigned char data[1]" declaration).
I try to extract the right and left images of the CR3 RAW files. Can anyone help me? At this point I dont even know if its possible^^ CR2 seems to work fine.
I reproduced it using dcraw_emu.exe directly using LibRaw-0.21.2-Win64 (downloaded today, Mar 28, 2024).
To view the source and destination images, I use FastImage Viewer, and Adobe Photoshop.
Recent comments