Setting the resolution of Camera
-
Hello All,
Current i am using opencv and QT to capture image from the camera.
I am using qtimer with timer.start(1) as one which captures the frame and refreshes the label at rate of one millisec.
I just need to know what will be the refresh rate of the camera is it the same at which i am refreshing the label or is there any way i can get the frame from camera at its refresh rate and display on label. -
@Kira The title of your post and it content do not match.
Refreshing 1000 times per second doesn't make sense. Neither your camera nor your monitor can handle that.
The refresh rate of your camera is what your camera does and depends on the camera. it doesn't matter how often you read it out.
Take a look at http://doc.qt.io/qt-5/qcamera.html#setViewfinderSettings -
@Kira Can't you use http://doc.qt.io/qt-5/qcameraviewfinder.html instead of manually drawing the frames on a label?
-
Recently I used OpenCV to grab frames from a USB camera. You can use
cap.set(CV_CAP_PROP_FPS, 30.0);
to set the framerate to what you like/need. That way you don't need to have a timer.I would strongly recommend to use Qt's Multimedia framework. It is really easy to use and you can even use OpenCV to process video frames.