- Download and install 'dcraw' on your system which decodes the RAW file and convert into standard 'TIFF' and 'PPM' image formats.
- Use 'imread' function to load the PPM file as a 3D matrix using the below command :
- Convert the obtained 3D image into a 2D matrix by converting it to grayscale using 'rgb2gray' function.