I'm working on image processing with some images I collected myself. Dlib's dlib.load_rgb_image('image_path')
method swaps the rows and columns on some images while OpenCV's cv2.imread('image_path')
method does not.
I don't want to go in and rotate some of these offending images myself manually because I'm creating an app.
Check out the results below
img = dlib.load_rgb_image("myimg.jpg")
print(img.shape)
--------------------
OUTPUT: (1944, 2592, 3)
(the resultant image is rotated 90 degrees clockwise)
while OpenCV's method returns the correct shape:
img = cv2.imread("myimg.jpg")
print(img.shape)
--------------------
OUTPUT: (2592, 1944, 3)
Does anyone have any idea why this is happening?
I am also attaching the image details of one of the offending photos: