Description: MATRIX = BMP2MAT(FILENAME) reads a standard windows bitmap file and stores the image data to MATRIX whose dimensions are WIDExHIGHx3, where WIDE is the width in pixels of the bitmap image, HIGH is the height in pixels of the bitmap image. The first plane of the output matrix (i.e., MATRIX(:,:,1) is the red data, the second plane is green, and the third is blue. Color values are stored from 0:1 (ML convention).
See File for further notes, revision history, future updates, and contact information.
Example: read in a bitmap file and display it in ML: %store the image data to mat mat = bmp2mat('MyBitmap.bmp'); %display the matrix as an image imagesc(mat);