How to obtain image from gige camera compatible
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
My code is very simple. No problem with the object creation. But I can't get any image neither with snapshot or preview function. Running the snapshot function reach the timeout period and give this error :
'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.'
The preview function produce a blank figure. In the documentation it appear so simple. Why those two functions doesn't work?
Here is my code :
%%Ini camera
g = gigecam('169.254.135.239');
%%Acquire and display a single image frame.
img = snapshot(g);
imshow(img);
1 comentario
Jhonata Tridapalli
el 6 de Abr. de 2018
Hello!
I get this same problem. Have you found any solutions yet?
Respuestas (4)
Walter Roberson
el 6 de Oct. de 2015
Speaking as a sometimes systems administrator:
Using a Link-Local IPv4 address is fragile. If it is the only IP address available then it typically indicates that the network is not configured properly, or that you are using WiFi in Ad Hoc mode. You are almost always better off (in practice) in setting up DHCP to one of the Private Address ranges in 192.168.*.* or 172.16.*.* through 172.31.*.* or 10.*.*.*, or else assigning a static IP address. If you do set up DHCP then you may wish to consider configuring static IP addresses for particular MAC addresses. https://technet.microsoft.com/en-us/windowsserver/dd448608.aspx
0 comentarios
Cristina Gonzalo-Tirado
el 9 de Nov. de 2016
Editada: Walter Roberson
el 22 de Feb. de 2021
Good afternoon,
I am experiencing a similar problem. I have three "the imaging source" cameras conected to a Poe switch and my computer connected to that switch. I can open and visualize live video and acquire images with the software of the camera (IC capture) without any problem.
However, I want to acquire images with Matlab with this very simple code, where I want to get three frames (one of each camera) in a row:
camara=gigecam('serialnumber');
pause(2)
fotoAdq=snapshot(camara);
pause(2)
imwrite(fotoAdq,'FotoAdquirida.jpg');
However, Matlab's code works randomly: sometimes an image is saved and sometimes the following error is displayed:
'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 don't think it is a programming issue, since sometimes I manage to get a frame from the camera, but I don't see how this can be implemented in and industrial environment since for the time being it is not reliable at all.
Any comment would be appreciated. Thanks in advance
0 comentarios
Jhonata Tridapalli
el 6 de Abr. de 2018
Hello!
I get this same problem. Have you found any solutions yet?
0 comentarios
M.B
el 22 de Feb. de 2021
Editada: M.B
el 22 de Feb. de 2021
(It's an old post but this might help others)
Check the properties of your network and see if you have a custom filter driver installed by the software that comes with the GigE camera. Desabling all properties and leaving TCP/IPv4 only may solve your problem.
Alternatively, you can check if your camera is GenICam compatible. Mine was and GenICam is more stable than GigE support package.
0 comentarios
Ver también
Categorías
Más información sobre GigE Vision Hardware en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!