opencv imwrite, image get rotated
One possible solution is to change cv2.IMREAD_UNCHANGED to cv2.IMREAD_COLOR while loading image with imdecode. From some reason "unchanged" is not able to read EXIF metadata correctly
I am using opencv in python (cv2) to do some processing on images with format jpg, png and jpeg, JPG. I am doing a test that write image to disk using "cv2.imwrite" right after reading from "cv2.imread". I found part of the image get rotated, some of them rotate 90d, some rotate 180d. But most image keep the right orientation. I cannot conclude a pattern that causes this rotation. Anyone knows more details? Thanks!