Reputation: 1153
I am interested in reading the rgb data of a raw image using python. I would like to analyze the rgb of the RAW image with NO filtering and processing done by the DSLR. How would you recommend proceeding? What library etc.? Storing as a numpy array, if possible would be advantageous, I believe. Using openCV was my initial idea, do you recommend anything else? Like I said, I want to analyze the image as RAW as possible, hence pre-color filter if possible. Thank you.
Upvotes: 1
Views: 3855
Reputation: 224
If you have the raw image ("my_picture.raw")? You could totally use OpenCV-Python to look at it.
raw_data = imread('my_picture.raw')
This should give you a numpy array of the pixels that your raw file contains.
Then, you can do some basic operations on the data (accessing pixels, doing object/feature recognition, etc.). There's a ton of detail on their website: https://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_core/py_basic_ops/py_basic_ops.html#basic-ops
If you don't have the raw image, then I'm not sure how to "undo" the processing of the DSLR, or if you can!
You don't have to use OpenCV, necessarily. If you have access to a Matlab license, you should check it out (easier to use IMO). Matlab has a very powerful set of image processing tools.
Upvotes: 0