How to read non-mirror image using opencv

while working with video streams using the webcam, the stream that is displayed is mirror image of the actual image. The left and right are switched. How to read and display the actual stream?

Hey @raghavagrawal, you just need to add this single line to flip left and right,

import cv2
cap = cv2.VideoCapture(0)
while True:
    
    ret,frame = cap.read()
   
    if ret == False:
        continue

    frame = cv2.flip(frame, 1)
    
    cv2.imshow("Video Frame",frame)

    key_pressed = cv2.waitKey(1) & 0xFF

    if key_pressed == ord('q'):
        break

cap.release()
cv2.destroyAllWindows() 

Hope this resolved your doubt.
Plz mark it as resolved in my doubts section. :blush: