如何使用OpenCV获取图像Exif数据? [英] How to get image Exif data using OpenCV?
问题描述
OpenCV是否支持获取图像的Exif数据? OpenCV中是否有一个程序可以解析Exif数据并获取适当的字段?
Does OpenCV support getting Exif data of images? Is there a program in OpenCV that parses the Exif data and get appropriate fields?
推荐答案
从3.1开始,opencv imread
可以完美处理exif方向.我知道这是一个老问题,但是最近我一直在努力寻找相同问题的答案,因此请在此处发布.显然,根据错误报告所述,cvLoadImage
目前不能正确处理exif方向. github.
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.
您可以找到一组不错的示例图像,它们具有不同的exif旋转和很好的解释
You can find a nice set of sample images with different exif rotations and a good explanation here
这篇关于如何使用OpenCV获取图像Exif数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!