Ask Your Question

Sid23's profile - activity

2016-01-09 10:08:34 -0500 received badge  Student (source)
2016-01-09 09:50:23 -0500 received badge  Supporter (source)
2016-01-09 09:50:04 -0500 commented question cv::imread - Camera orientation problem

I guess 'reshape' wasn't the correct terminology for this problem. What I meant was that the 'orientation' has changed. As for the images, I didn't think that they would be imbedded into the notification emails since I provided external links

2016-01-09 09:46:53 -0500 commented answer cv::imread - Camera orientation problem

yes, you are right. It is due to the camera orientation issue. My version of OpenCV doesn't handle orientation properly. I've found a workaround though, which is good enough for my purposes. Thank you for your help.

2016-01-09 03:00:38 -0500 asked a question cv::imread - Camera orientation problem

I'm following this guide here 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)


Before (t1.JPG):

After (t1-clahe.JPG):
image description

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