List of Image Formats Supported by OpenCV

Below is the list of supported image formats in OpenCV. You should note that if you build OpenCV yourself you have the option to remove support for some of the types but out of the box OpenCV supports the following:

  • Windows bitmap (bmp)
  • Portable image formats (pbm, pgm, ppm)
  • Sun raster (sr, ras)
  • JPEG (jpeg, jpg, jpe)
  • JPEG 2000 (jp2)
  • TIFF files (tiff, tif)
  • Portable network graphics (png)


How to read image orientation in Qt (Using stored EXIF)

Updated: QImageReader class in Qt has a new method (introduced in Qt 5.5) named transformation() which you can use for this purpose but this article still applies if you are not using 5.5 or having problems with QImageRaader. Also it is a useful example on how to use GDI in Qt.

You might have also noticed that Qt reads jpg, tif and other types of images that it supports without paying any attention to EXIF information stored in them. EXIF meta data contains highly valuable information about the characteristics of a photograph. Let’s say you want to read an image file into QImage and do some process over it. It is crucial to know what type of orientation the image needs to go through right after reading it.

Continue reading “How to read image orientation in Qt (Using stored EXIF)”

How to Open Android Image Gallery in Qt

This article describes how to open default Android Gallery in Qt using a mixture of Android’ Java and Qt (C++) code. It is specially useful if you are working with images, for example if you want to open a Mat Image in OpenCV using imread function or if you are just writing some kind of image viewer program. Unfortunately Qt does not offer this (yet) by default so I thought I could share it with you.

Continue reading “How to Open Android Image Gallery in Qt”