st599
1
Hi,
I’m interested in automating some of the processing of files created in: Convert .CR2 camera RAW to Linear RGB
I would like to:
a) import a linear 16-bit TIFF
b) get the RGB pixel values within a fixed rectangle
c) calculate the mean average Luma (Y) value
Could this be done in Python Pillow?
PS I found a way to do the RAW processing in DCRAW and AWK. Would love to try to add BT.2020 to DCRAW output if that’s possible?
afre
(Alan)
2
@st599 Welcome to the forum!
-
dcraw
: I would contact its author https://www.cybercom.net/~dcoffin/dcraw.
-
Pillow
: probably but I am not familiar with it. I would use G’MIC or ImageMagick. E.g., in G’MIC:
gmic sample cat crop 10,5,60,80 rgb2ycbcr s c k...
- input cat sample image
- crop rectangle
- convert linear RGB to YCbCr
- split channels
- keep Y’
http://gmic.eu/reference.shtml
Edit: Sorry, you specifically asked for Rec. 2020. Maybe @David_Tschumperle could help you with that; e.g., provide the option to select the Rec.