11

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

mary
  • 439
  • 3
  • 5
  • 7

2 Answers2

7

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

Paulus
  • 1,263
  • 16
  • 18
  • So can I get EXIF metadata using opencv's `imread`? I am looking at the docs [here](https://docs.opencv.org/4.5.5/d4/da8/group__imgcodecs.html#ga288b8b3da0892bd651fce07b3bbd3a56) but it seems it can only *take into account* the orientation, rather than returning a dict with the exif tags... – baggiponte Feb 01 '22 at 23:15
-3

OpenCV has no Exif support. It's not the purpose of OpenCV.

SSteve
  • 10,212
  • 5
  • 47
  • 70
Andrey Kamaev
  • 28,928
  • 6
  • 88
  • 86