Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

cv::imread - Camera orientation problem

$
0
0
I'm following this guide [here](http://docs.opencv.org/master/d5/daf/tutorial_py_histogram_equalization.html#gsc.tab=0) to try out CLAHE in Python, so I have the following code: import numpy as np import cv2 img = cv2.imread('t1.JPG',0) clahe = cv2.createCLAHE(clipLimit=2.0, tileGridSize=(8,8)) cl1 = clahe.apply(img) cv2.imwrite('t1-clahe.JPG',cl1) Before (t1.JPG):
[t1.JPG](https://www.dropbox.com/s/m20spcyuf00oilr/t1.JPG?dl=1) After (t1-clahe.JPG):
[image description](https://www.dropbox.com/s/zg7t6yq4wr7hwdd/t1-clahe2.JPG?dl=1) So, if you see the links provided, the image has been reshaped. There doesn't seem to be any indication in the guide that this should happen. Am I missing something here? I don't want to reshape the image. Funny thing is that if I output the shape of the image then there seems to be no change. I get the following: Before: (2448, 3264) After: (2448, 3264) But if you look at the after image, it has clearly been reshaped. I noticed another thing. This problem is only happening with images taken from my iPhone 5S. I tried other images and they did not have the same issue. I tried to find differences between the images that are being reshaped and ones that aren't. So, I noticed the following difference: reshaped : JPEG image data, EXIF standard 2.21 not reshaped: JPEG image data, JFIF standard 1.01 Any help with this problem would be greatly appreciated. *OpenCV version being used: 2.4.8*

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>