Open kibsoft opened 11 years ago
How could I change camera's capture resolution in CameraGrabber class?
There is the static maximumFrameSize function that returns max camera resolution. If you want to grab images with higher/lower resolution you will need to use setSize function. Images' aspect ratio will be saved.
Thank you very much! However, maximunFrameSize always returns 640x480 no matter what webcam I am using even if they allow higher resolution. Is this the maximum achivable resolution? If I set the resolution using setSize function the image is just upscaled. Is there any parameter I should change to try to achieve a higher resolution? Many thanks in advance :)
Seems that it is OpenCV's issue. I thought that CV_CAP_PROP_FRAME_WIDTH contains the max size by default but I was wrong.I think there is no other way to know max camera resolution :( You can set CV_CAP_PROP_FRAME_WIDTH and CV_CAP_PROP_FRAME_HEIGHT manually. But there is an issue. You have to either extend QtMEL and rebuild or use OpenCV directly in your code. If you use Qt5 version then I can do that myself and will give you binaries (but I need some time).
Thank you very much for your reply! I am using Qt5 and would be great if you could upload the binaries :) But I will try myself your suggestions meanwhile.
Add ability to change contrast, saturation, hue, brightness in the CameraGrabber class.