flipping the images by calling the flip function from the cv2 module

Flip Image OpenCV Project Screenshot
Flip Image OpenCV Project Screenshot
Flip Image OpenCV Project Screenshot
Flip Image OpenCV Project Screenshot
Update
Mar 27, 2023
Developer
Category
Installs
0+
Rate
0
To flip the image both vertically and horizontally, i.e. along both the x and y axis, we need to provide a negative value to flipCode.
OpenCV-Python is a library of programming functions mainly aimed at real-time computer vision. cv2.flip() method is used to flip a 2D array. The function cv::flip flips a 2D array around vertical, horizontal, or both axes. The OpenCV function that flips the image (= ndarray ) vertically and horizontally is cv2. flip()
The image is flipped according to the value of flipCode as follows:
flipcode = 0 : flip vertically.
flipcode > 0 : flip horizontally.
flipcode < 0 : flip vertically and horizontally