Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get image Exif data using OpenCV?

Tags:

opencv

Does OpenCV support getting Exif data of images? Is there a program in OpenCV that parses the Exif data and get appropriate fields?

like image 863
mary Avatar asked Sep 22 '11 13:09

mary


People also ask

How do I get EXIF data from a photo?

On a Windows PC using File Explorer right-click on the file you want to see the data for. You will see a window pop up with various options. Click on Properties and then on Details. This will bring up the EXIF data for that photo.

How do I view EXIF files?

Almost all major operating systems can open an EXIF file. To open in Windows, right-click on the EXIF image file to view its data. Scroll down to Properties and then click on Details. For macOS, open the photo you want to view in Photos.

What is EXIF in Python?

This metadata is stored in Exif (Exchangeable image file format), a format standard for the various types of media (e.g. images, videos, audio) taken by devices such as digital cameras and smartphones. The Python library used in this project is exif, which happens to be the namesake of the Exif format.


1 Answers

As of 3.1 opencv imread handles exif orientation perfectly. I know this is an old question, but I struggled to find an answer to this same question recently, so am posting here. Apparently cvLoadImage does not handle exif orientation correctly at this time according to a bug report on github.

You can find a nice set of sample images with different exif rotations and a good explanation here

like image 101
Paulus Avatar answered Sep 29 '22 05:09

Paulus