PDA

View Full Version : Gige camera and matlab



cgonzalo
November 9, 2016, 11:40:05
Good morning,

I am experiencing problems when trying to use Matlab to obtain images from three cameras installed in an industry. We have three gige cameras (two are DMK 33GX174 and one is DFK 33GX174) connected to a switch PoE and my computer also connected to the switch PoE.

Also the switch is connected to a PLC because the whole system consists of a sequence in which each camera is introduced in the hot temperature environment, the image is acquired and then the camera is extracted from the harsh environment. So everything is syncronized.

When I open IC Capture I can see the three cameras and visualize live video (not the three cameras simultaneously, but that is not a problem).

However, since the acquisition step is integrated in a whole sequence, I want to obtain the images via Matlab. Thus, I have developed a very simple Matlab code that firstly creates the camera object, gets a frame and saves the frame, like this:

camara=gigecam('serialnumber');
pause(2)
fotoAdq=snapshot(camara);
pause(2)
imwrite(fotoAdq,'FotoAdquirida.jpg');

The problem is that randomly (it does not happen always!!), when i run the sequence, Matlab cannot acquire the image and the following error apears:

'Time out occured while trying to get a frame from the camera. Modify the 'Timeout' property to change how many seconds 'snapshot' method waits to return image data.'

I have checked the Matlab documentation and the Timeout property is set by default to 10 seconds.

Can anybody help me to solve this problem?
Since the acquisition sometimes work and sometimes doesn't work, I am afraid that the system is not robust enough to be installed in an industrial environment.

Thanks in advance,
Cristina

Stefan Geissler
November 11, 2016, 18:21:18
Hello Cristina

I am afraid, this is a support case for Matlab support stuff, because it seems, none of our software is in use.

Only one short guess: Try lower frame rates in all cameras.

cgonzalo
November 14, 2016, 11:55:04
Hello Stefan,
Thank you very much for the suggestion.
Is it posible to change the frame rate with IC capture and save the configuration for the camera so that anytime I open IC capture it 'remembers' the new frame rate?
Thanks in advance,
Cristina

Stefan Geissler
November 15, 2016, 09:40:11
Hello Cristina

yes, it is possible. In the "Device" toolbar, where you can select video formats is on the right side a box labeled with "fps". That is the frame rate.

In the "File" menu, you can save and load a device configuration. It is saved with the extension "ICCF". If such a file is double clicked, IC Capture will be started with this configuration.