How can I set webcam resolution with opencv in python?
I'm trying to get the maximum resolution that my webcam has..! But I have no idea how to do it.. Does anyone had this problem before? Please give me some comments below. Thanks. Here's my codes.
vs = VideoStream(src=0).start()
fileStream = False
time.sleep(1.0)
total = 0
pre = 0
while True:
if fileStream and not vs.more():
break
frame = vs.read()
frame = cv2.flip(frame,1)
frame = imutils.resize(frame, width=1280)
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
...
Read doc : set and properties
VideoStream
is not even from opencv ;(https://github.com/jrosebr1/imutils/b...
so,unless it's using the picam (we can't help with that), we're here: https://github.com/jrosebr1/imutils/b...
and it's
vs.stream.set(something)
@sangeun , you should be careful with 3rdparty wrappers using opencv code, even if it's from adrian ..
at some point, noone will be able or willing, to dig through layers and layers of wrapping
@sangeun, there's no way to choose the resolution from an ip capture, using opencv.
please lookup your camera's manual, and try to find out, if they offer a different URL for this
Thanks for your comments! I should find out the other options from camera setting. Actually I just started to learn both python and opencv, so I'm kind of struggling now haha Thank you again :)