GOEDUHUB Online Courses || Last Batch Student's Projects || COVID-19 Projects(AI-ML) || Universities  ||  Placement Preparation  Subscribe our youtube channel
+91-7976731765 Free Online Tutorials || AI || ML || NLP ||  OpenCV || Python || DBMS || OOPs || DSA || Java || Linux/Unix ||  C Programming
0 like 0 dislike
127 views

1 Answer

0 like 0 dislike
by Goeduhub's Expert (8.1k points)
 
Best answer

# Import Computer Vision package - cv2
import cv2

# Read the image using imread built in function
image = cv2.imread('image_3.jpg')

# Display original image using imshow built in function
cv2.imshow("Original", image)

# Wait until any key is pressed
cv2.waitKey(0)

# cv2.flip is used to flip images


# Horizontal flipping of images using value '1'


flipping = cv2.flip(image, 1)

# Display horizontally flipped image
cv2.imshow("Horizontal Flipping", flipping)

# Wait until any key is pressed
cv2.waitKey(0)

# Vertical flipping of images using value '0'


flipping = cv2.flip(image, 0)

# Display vertically flipped image
cv2.imshow("Vertical Flipping", flipping)

# Wait until any key is pressed
cv2.waitKey(0)

# Horizontal & Vertical flipping of images using value '-1'


flipping = cv2.flip(image, -1)

# Display horizontally & vertically flipped image
cv2.imshow("Horizontal & Vertical Flipping", flipping)

# Wait until any key is pressed
cv2.waitKey(0)

# Close all windows
cv2.destroyAllWindows()

 Goeduhub:

About Us | Contact Us  © goeduhub.com Social::   |  | 
 Placements:   List of companies | Logical Reasoning Questions | Quantitative Aptitude Questions | General English Questions | Technical-MCQ and Interview Questions
 Important Lists: List of NITsList of IITsList of Exams After Graduation | List of Engineering Entrance Examinations (UG/PG)College ReviewsCollege Fest, Events & WorkshopsKnowledge ShareTrainees/Interns After 15-04-2020
Exams & Cutoffs: JEE Main | JEE Advanced | GATE | IES | ISROList of PSUs || Cutoff-GATECutoff_IIT-JEECS-ScopeECE ScopeEE-Scope
 Download Previous Year Papers For:  GATE | IES | RAJASTHAN TECHNICAL UNIVERSITY (RTU-Kota)RPSC Technical Exams | ISRO
...