Reputation: 835
I have a sequence of ordered image and I read it as a video with cv2.videocapture, call it train_video. However I noticed that the video is upside down compared to the original sequence of images, therefore I want to use cv2.flip function to flip it.
I have two questions-
What could be the reason that it is upside down??
What is the most efficient way to flip all the frames in the video? I know I can create an empty video and then start to add the flipped frame one by one into this video, but there must be some more efficient method for me to alter the frame within the video object train_video directly, right?
Thanks for your help!
Upvotes: 2
Views: 1938
Reputation: 1240
Check out my answer here on how to fix that.
Some cameras by default capture frames/images in landscape orientation. To display them correctly use the image/video's exif metadata tags to figure out the correct orientation.
Upvotes: 1