Open erenaud3 opened 5 years ago
You can log the return value of cap.set()
to see if it's accepted.
I guess it's not accepted by the capture device (see the document).
Thanks for your answer.
I checked, and the return value is "true" as expected.
that doesn't work for me ...
i got false
when vCap.set(cv.CAP_PROP_FRAME_WIDTH, 640);
that doesn't work for me ... i got
false
whenvCap.set(cv.CAP_PROP_FRAME_WIDTH, 640);
Are you sure that your webcam can handle this resolution ?
You can use this command to check it :
lsusb -s 001:003 -v | egrep "Width|Height"
This is really tricky because some cameras don't work as intended.
My advice is to set the value CAP_PROP_SETTINGS
to something positive. Hopefully you'll get a dialog window appearing allowing you to set all the possible values for the camera non-programmatically.
If you cannot set some property values there, you might be able to draw some conclusions from that.
this is also happening to me as well
vCap = new cv.VideoCapture(0);
console.log('width', vCap.set(cv.CAP_PROP_FRAME_WIDTH, 720));
console.log('height',vCap.set(cv.CAP_PROP_FRAME_HEIGHT, 480));
and console of
width true
height true
Hi,
I can't manage to set width and height for capture. Here's my code:
Which gives me the following output:
Am I doing something wrong ?
PS: Normally, my webcam should support the resolution 1280x720:
EDIT: I initially put a Coffeescript snippet, I changed it to Javascript.