Ask Your Question

Aotearoa's profile - activity

2015-01-25 13:49:58 -0600 received badge  Self-Learner (source)
2015-01-25 03:10:11 -0600 answered a question Cannot set properties (frame_width, _height, ...) for Ximea camera (OpenCV 2.4.10 compiled with WITH_XIMEA flag)

I've found the solution myself: There's a mistake in the resetCvImage() method of the cap_ximea.cpp. line 207 if( (int)image.width != width || (int)image.height != height || image.frm != (XI_IMG_FORMAT)format)

has to be: if( (int)image.width != frame->width || (int)image.height != frame->height || image.frm != (XI_IMG_FORMAT)format)

2015-01-21 13:25:27 -0600 commented question Cannot set properties (frame_width, _height, ...) for Ximea camera (OpenCV 2.4.10 compiled with WITH_XIMEA flag)

Thank you for your quick reply. It's not that I do not get any frame. The frames are shown, e.g., four times as smallthumbnails in a big window with the default size of the ximea camera. Maybe I'm doing something wrong, but I cannot find the mvret in my debug. Yes, I build opencv with ximea - if I haven't I would not be able to access the ximea camera with CV_CAP_XIAPI

2015-01-21 02:03:57 -0600 asked a question 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 :)