You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In which part of the OpenCV library you got the issue?
Examples:
imgcodecs
reading an image with exif orientation
Expected behaviour
Since OpenCV 3.1, exif orientation is now used to rotate images properly. imread and cvLoadImage should output an image rotated accordingly to the exif orientation.
Actual behaviour
imread outputs an image with correct orientation, cvLoadImage seems to ignore the exif orientation, though they seem to call the same internal method to read a JPEG image.
Code example to reproduce the issue / Steps to reproduce the issue
Please try to give a full example which will compile as is.
#include <opencv2/opencv.hpp>
#include <opencv/highgui.h>
int main(int argc, char** argv){
IplImage* image = cvLoadImage("input.jpg", CV_LOAD_IMAGE_COLOR);
cvSaveImage("output_cvloadImage.jpg", image);
Mat mat = imread("input.jpg", CV_LOAD_IMAGE_COLOR);
imwrite("output_imread.jpg", mat);
return 0;
}
input.jpg is portrait with Orientation: 6 (Rotated 90° CCW)
output_cvloadImage.jpg is landscape
output_imread.jpg is portrait
The text was updated successfully, but these errors were encountered:
C API ("cv" prefix) is obsolete and should not be used in new programs, but there are still some programs which use it. So it is unwanted to change existed behaviour.
Related issue of changed behaviour: #6348
I prefer to leave this "as is": cv::imread uses EXIF (by default, until we add control flag for this behaviour), cvLoadImage doesn't use EXIF information.
Please state the information for your system
In which part of the OpenCV library you got the issue?
Examples:
Expected behaviour
Since OpenCV 3.1, exif orientation is now used to rotate images properly. imread and cvLoadImage should output an image rotated accordingly to the exif orientation.
Actual behaviour
imread outputs an image with correct orientation, cvLoadImage seems to ignore the exif orientation, though they seem to call the same internal method to read a JPEG image.
Code example to reproduce the issue / Steps to reproduce the issue
Please try to give a full example which will compile as is.
input.jpg is portrait with Orientation: 6 (Rotated 90° CCW)
output_cvloadImage.jpg is landscape
output_imread.jpg is portrait
The text was updated successfully, but these errors were encountered: