ImLab Scilab Function
Last update :
imread - image file reading
Calling Sequence
-
[image_data] = imread(filename)
Parameters
-
image_data
: image pixel values
-
filename
: name of the file containing the image
Description
This function opens a file with extension :
-
png: 1-bit to 16-bit grey level image, or 3*8-bit to 3*16-bit color image, lossless compression
-
jpg: 8-bit grey or 24-bit color image, lossy compression
-
bmp: 8-bit paletted image, or 24-bit color image (other depth or RLE encoding NOT supported)
-
pgm: 8-bit grey level image
-
ppm: 24-bit color image
-
dcm: 12-bit grey level image
-
tif: 16-bit grey level image
and loads all data encoding the image to write it in a Scilab matrix.
If the image is a gray level image, this function returns a M * N matrix with M equal to the image width and N equal to the image height. If the image is a color image, the matrix returned is an hyper matrix in 3 dimensions. First, second and third plans equal respectively red, green, blue pixel values.