How to display Raw frame from webcam?
I am using OpenCV 3.4.2 and my camera is QQSJ-8808 in a part of my project, I have to display various result of processes frame. but I can not find the way to display raw frame (direct from camera without any image processing). when I used cv2.imshow(), it shows me the colored frame.
but first, I want to show the raw frame and then I want to show grayscale and then colored.
Please help to solve the issue.
mycode :
# Start default camera
video = cv2.VideoCapture(0)
while video.isOpened():
ret, frame = video.read()
# frame = cv2.cvtColor(frame, cv2.COLOR_BGR2YUYV)
cv2.imshow("frame", frame)
key = cv2.waitKey(1) & 0xFF
# if the `q` key was pressed, break from the loop
if key == ord("q"):
break
# Release video
video.release()
cv2.destroyAllWindows()
how do you get images from that, exactly ? (please show the code, you're using !)
can you show us an output image ?
can you look up the datasheet of your cam ? what does RAW mean, exactly, here ? (it can be anything !)
I already have updated my question with my code, my camera supports the following formats, MJPEG, YUY2.
sorry, I thought YUY2 is a raw image. how can I enable my cam to capture YUY2 formate?