Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Cannot set properties (frame_width, _height, ...) for Ximea camera (OpenCV 2.4.10 compiled with WITH_XIMEA flag)

Without any problems I can access my internal camera webcam and also change the resolution. So displaying the frame with default resolution and with a predefined resolution (e.g., from 640x480 to 320x240, with cap.set(CV_CAP_PROP_FRAME_WIDTH,320), and FRAME_HEIGHT, 240)) – both work fine.

Using the same code with slight adaption so that it works with a Ximea camera (VideoCapture cap(CV_CAP_XIAPI)), does work for the default resolution. It is a MU9PC_MH with a default resolution of 2592x1944. It does not work for another than the default resolution, e.g., 648 x486 (referring to Ximea specifications it is supported by the camera).

As I had already asked that question in Stackoverflow, I tried the proposed solution of resizing the frame after receiving, but comparing with the result I get with the ximea api, the opencv result seems worse. I know that I have to set properties to my requirements, as it is a industrial camera, but I would rather prefer doing it via OpenCV.

Does anyone have any suggestions? Thanks for reading :)