image height and width swapping
As I read my image using opencv imread function, I see that its height and width are being swapped. As a result, I see rotated image. This does not change even if I rotate image prior to it being read. What can be the workaround for this problem?
So, below I have provided the input images: one is original and second one is rotated (I rotated it using windows rotate command, by right-clicking and selecting 'rotate right'). Output I get for both the images is same. It seems to me that rotating image did not actually change its shape. I think so because, when I try to put the rotated image here then also, it was showing the un-rotated version of it only (in the preview) so, I had to take a screen-capture of it and then, paste it here.
This is the code: 'import cv2 import numpy as np import sys import os
image = cv2.imread("C:/img_8075.jpg") print "image shape: ",image.shape cv2.imshow("image",image) cv2.waitKey(0) image2 = cv2.imread("C:/img_8075_Rotated.jpg") print "image shape: ",image2.shape cv2.imshow("image",image2) cv2.waitKey(0)'
I think the question should make sense now. Let me know if still further information is needed. Thanks for your help!
i just don't believe you.
please add image and code as a proof.
please see the edit.