Can Windows Firewall interfere with acquiring images from a GigE Vision camera when using MATLAB Image Acquisition Toolbox with the videoinput gige or gigecam interfaces?
MATLAB: Windows Firewall and GigE Vision Cameras
Image Acquisition Toolbox
Related Solutions
For USB cameras, the individual model compatibility is better addressed by the specific vendor in terms of compatibility with a particular driver they provide.
For these two particular cameras, the vendor appears to provide drivers for Windows only:
Please confirm with the manufacturer if the drivers are compatible with
DirectShow
compliant imaging applications on Windows. If this is the case, the camera may work with Image Acquisition Toolbox:
Note: This error can occur if the Ethernet adapter, camera network connection, and camera GigE streaming parameters (PacketSize and PacketDelay) are not configured for optimum operation. For more details, refer to:
- "GigE Vision Quick Start Configuration Guide" (attached at the end of this article as <http://www.mathworks.com/matlabcentral/answers/uploaded_files/41167/GigEVisionQuickStart.pdf GigEVisionQuickStart.pdf>).
- http://www.mathworks.com/matlabcentral/answers/91834
The dropped packet / frame error is taking place in the Image Acquisition Engine thread and cannot be caught with try/catch.
One option, which, depending on the application, might be useful is to use the following command to disable errors when dropped frames occur and to continue acquisition:
imaqmex('feature', '-gigeDisablePacketResend', true);
Note: 'gigeDisablePacketResend' option will be reset by the imaqreset command.
When dropped frames are allowed, it is relevant to know how many frames and which frames have been dropped during acquisition. The BlockID field in the metadata returned by getdata corresponds to the frame number set by the camera. A simple way to visualize this is to plot the acquired frames' BlockID and BlockID differences, as in the following code snippet:
[img, ts, metadata] = getdata(vid, vid.FramesAvailable);blockIDs = [metadata.BlockID];figure;plot(blockIDs, '.')figure;plot(diff(blockIDs), '-x')
Another option for cameras that have GenTL (GenICam Transport Layer) producers provided by the vendor, is to use the GenTL adaptor ("GenICam Interface" support package / add-on) instead of the GigE adaptor to acquire images from the camera. This approach can make use of the high performance Ethernet packet filtering drivers provided by the vendor, and direct camera communication, including dropped packet events, will be handled by the manufacturer's GenTL producer.
Best Answer