Loading an image in OpenCV

Standard

OpenCV Images are held in the Mat data structure. The IplImage data structure is deprecated. OpenCV offers support for the image formats Windows bitmap (bmp), portable image formats (pbm, pgm, ppm) and Sun raster (sr, ras). With help of plugins  you may also load image formats like JPEG (jpeg, jpg, jpe), JPEG 2000 (jp2), TIFF files (tiff, tif) and portable network graphics (png).

 OpenCV Load Image C++
To load and display an image using OpenCV:

Compilation:

Output:

OpenCV Window

OpenCV Load Image Python

Leave a Reply