Getting RGB values for each pixel from a raw image in C

后端 未结 3 1811
迷失自我
迷失自我 2021-01-02 20:46

I want to read the RGB values for each pixel from a raw image. Can someone tell me how to achieve this? Thanks for help!

the format of my raw image is .CR2 which com

3条回答
  •  旧时难觅i
    2021-01-02 20:54

    A RAW image is an uncompressed format, so you just have to point where your pixel is (skipping any possible header, and then adding the size of the pixel times the number columns times the number of row plus the number of the colum), and then read whatever binary data is giving a meaningful format to the layout of the data (with masks and shifts, you know).

    That's the general procedure, for your current format you'll have to check the details.

提交回复
热议问题