python - Reading a RAW image (.CR2) using numpy.fromfile -


i trying read raw image in .cr2 format ("canon raw format"). wanted opencv not work tried doing numpy function:

img = np.fromfile('img.cr2', "uint16") 

the camera canon eos t5 18mp dslr. if run img.size return 10105415 seems small 18 mp camera.

my first question, using np.fromfile() valid approach?

secondly, recommend other python libraries same process in easier way/more efficient? have opencv installed if done there, great (i still want store numpy array).

canon raw format not blob of data, has metadata need parse. luckily, others have implemented python parsers.

raw image processing in python

after using 1 of suggested solutions can load data numpy array.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -