Changing capture resolution in cv2

52 views
Skip to first unread message

Max R

unread,
Feb 12, 2015, 7:15:23 PM2/12/15
to pyqt...@googlegroups.com
Hi,

I am trying to change the capture resolution in cv2. I already looked up some posts about it, like http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_gui/py_video_display/py_video_display.html , but the command sequence there doesn't seem to work for me.

Here is my piece of code:

channel = 0

camera = _cv2.VideoCapture(channel)

camera.set(_cv2.cv.CV_CAP_PROP_FRAME_WIDTH, 1280)

camera.set(_cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, 1024)

print camera.get(_cv2.cv.CV_CAP_PROP_FRAME_WIDTH)

print camera.get(_cv2.cv.CV_CAP_PROP_FRAME_HEIGHT)


And the print out is:


640.0

480.0


Can anyone help me with this issue?


Thanks in advance!


Max



Luke Campagnola

unread,
Feb 13, 2015, 9:58:58 AM2/13/15
to pyqt...@googlegroups.com
I think you might be in the wrong forum :)

--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/cd0a512a-89d9-4421-b843-c8efc4cb19a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Max R

unread,
Feb 13, 2015, 1:59:37 PM2/13/15
to pyqt...@googlegroups.com
Oh yep that is right, sorry!
Reply all
Reply to author
Forward
0 new messages