[mmBmpwrite] [Up] [mmIsbinary] Image file I/O

mmReadgray
Read an image from a commercial file format and stores it as a gray-scale image.

Synopsis

Image mmReadgray ( const String& filename );

Input

filename String

Name of file to read.

Output

y Image [ Gray-scale (uint8 or uint16) or binary image ]

Description

mmReadgray reads the image in filename and stores it in y, an uint8 gray-scale image (without colormap). If the input file is a color RGB image, it is converted to gray-scale using the equation: y = 0.2989 R + 0.587 G + 0.114 B.

See also

[mmBmpwrite] [Up] [mmIsbinary]