Why does IMAQREGISTER not throw an error even when I attempt to register an invalid adaptor file using Image Acquisition Toolbox 3.3 (R2009a) ?
2 views (last 30 days)
Show older comments
I am using a Futronics scanner to digitize fingerprint images. Currently, I am saving these images on my system and then importing it into MATLAB using the IMREAD function. I would like to be able to use this scanner directly with MATLAB using the Image Acquisition Toolbox 3.3 (R2009a).
The documentation for the Image Acquisition Toolbox specifies that in order to use a third party device that is not supported by the MathWorks by default, I would have to obtain an adaptor from the vendor and register the same using the IMAQREGISTER function. The adaptor appears to be a DLL file.
When I attempted to register the DLL the vendor provided using the following command:
imaqregister('C:\Temp\VendorAdaptor.dll');
I did not receive any errors. Additionally, when I typed the command IMAQREGISTER, it listed the above DLL as a registered third-party adaptor.
However, when I type IMAQHWINFO, this adaptor does not appear in this list of Installed Adaptors.
How can I identify if a DLL file is a valid adaptor? Also, why does IMAQREGSITER not generate an error when attempting to register an invalid adaptor?
Accepted Answer
MathWorks Support Team
on 25 May 2010
This enhancement has been incorporated in Release 2010a (R2010a). For previous product releases, read below for any possible workarounds:
The IMAQREGISTER function in the Image Acquisition Toolbox does not check if the input file provided is a valid adaptor file. To ensure that a third party adaptor is installed for the Image Acquisition Toolbox to use, inspect the output of the function IMAQHWINFO after registering the adaptor.
An adaptor is a DLL that implements the connection between the Image Acquisition Toolbox (IAT) engine and the device driver via the device vendor's software development kit (SDK). The IAT engine requires that every adaptor export the following five functions:
initializeAdaptor
getAvailHW
getDeviceAttributes
createInstance
uninitializeAdaptor
The toolbox calls these functions to communicate with the device and acquire data.
To verify if a DLL file is a valid adaptor, use the steps below:
1. Download the tool called Dependency Walker from the following location:
<http://dependencywalker.com>
This tool allows you to view the dependencies of your DLL or EXE file. You can use any other tool that provides the same functionality.
2. Open the "adaptor" DLL file using Dependency Walker. The functions listed above should be contained in the list of functions exported by the DLL file.
If the functions mentioned above are not exported by the DLL file, contact the vendor of your hardware to obtain the correct adaptor.
0 Comments
More Answers (0)
See Also
Categories
Find more on Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!