import numpy as np
import cv2
img=cv2.imread('1.png')
rimg=img.copy()
fimg=img.copy()
rimg=cv2.flip(img,1)
fimg=cv2.flip(img,0)
cv2.imshow("Original", img)
cv2.imshow("vertical flip", rimg)
cv2.imshow("horizontal flip", fimg)
cv2.waitKey(0)
cv2.destroyAllWindows()
Been looking for this. Thanks
ReplyDeleteThanks , was looking for this
ReplyDeleteThat ruins my 2 hours. thanks :D
ReplyDeletethese two lines are not necesary,since fimg and rimg are overwritten later
ReplyDeleterimg=img.copy()
fimg=img.copy()
(they cause unnecessary performance loss)
Thank you ! :D
Deleteyes.i was about to write it
DeleteThank you, very timely, I used the finished code fragment, got a mirror image, helped out, thanks again
ReplyDeleteThis is way to flip a image but is their any to check image is flipped with respect to original image
ReplyDeletethank you!
ReplyDeleteHorizontal and vertical flips are usually called the other way around. Horizontal when points move horizontally.
ReplyDeleteYou are absolutely right.
DeleteI already saw several examples, probably all derived from the same source with this mistake.
Vertical flip is 0 and horizontal is 1 (and both is -1)
OK I will change it
ReplyDeletethanks ! that helped :)
ReplyDeleteThank You!!!
ReplyDeleteInformative and good article.Thanks for sharing.
ReplyDeleteSRE Training in Hyderabad
Site Reliability Engineering Course
Site Reliability Engineering Online Training
Site Reliability Engineering Training in Hyderabad
Site Reliability Engineering Training
Informative and good article.Thanks for sharing.
ReplyDeleteSRE Training in Hyderabad
Site Reliability Engineering Course
Site Reliability Engineering Online Training
Site Reliability Engineering Training in Hyderabad
Site Reliability Engineering Training