Loads an image
img = imread(filename[, flags])
Path of file to be loaded (string
).
Flag specifying the color type of the loaded image (int
):
CV_LOAD_IMAGE_ANYDEPTH
: return a 16-bit/32-bit image when the input has the corresponding depth, otherwise convert it to 8-bit.CV_LOAD_IMAGE_COLOR
: convert to a color image.CV_LOAD_IMAGE_GRAYSCALE
: convert to a grayscale image.Loaded image (Mat).
imread
loads an image from the specified file path and returns the Mat object containing it.