Setting the resolution of Camera
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
@jsulm : thanks for the reply so is there any way in which i can match the refresh rate of the camera to the rate which i refresh the image of QLabel
@jsulm : Currently as per the requirement i have to use opencv to interface with the camera.
So i am getting images in form Mat and inorder to display it as a continuous image i am displaying it on label.
@Kira I never used OpenCV - isn't there some kind of notification if there is a new frame? This way you would not need to synchronise anything.
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.