Reputation: 7298
I have python code which is showing the live video feed from usb Logitech Camera. Below is the code snippet:
vcap = cv2.VideoCapture(1)
while (1):
ret, frame = vcap.read()
cv2.imshow('Input', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
vcap.release()
cv2.destroyAllWindows()
Output:
Above is the screenshot taken from opencv window and below is the photo taken from windows default camera app.:
We can notice that opencv by defaults crop some of the left and right portion from the frame. How can remove this feature from opencv.?
Upvotes: 2
Views: 1920
Reputation: 4377
This is about the resolution settings. Windows app. or OpenCV uses different resolutions. Cameras which have their own drivers you can't set their resolution settings by OpenCV.
Since your camera is a webcam(usb) camera, you can use set
property. As mentioned here.
Upvotes: 2