I have written a code to rotate images and save them. So I used OpenCv to save rotated image. After save the rotated image, It gets blue on the image.
OS : Ubuntu 16.04
This is the code :
from scipy.ndimage import rotate
from scipy.misc import imread, imshow
import cv2
count = 0
while True:
if count<230:
filename = 'frame'+str(count)+'.jpg'
print(filename)
img = imread(filename)
rotate_img = rotate(img, 90)
cv2.imwrite(filename,rotate_img)
count = count + 1
continue
else :
break
Why color change like this? What should I need to do? Any help would be appreciated! Thank you in Advanced!
Image(Before saved) :
Image(After saved) :