Cannot Access Hamamatsu Camera From EXE

I am working with the Hamamatsu C11440-22CU camera using the Image Acquisition Toolkit.
This all works fine when I run inside MatLab but when I build .EXE it fails to connect to the camera (running on the same computer with the MRC installed)
I have the following code to get some information:
a = imaqhwinfo;
num = size(a.InstalledAdaptors,2);
fprintf( ['\nInstalledAdaptors ',num2str(num),'\n'] );
for ii = 1 : num
fprintf( '%s', a.InstalledAdaptors{ 1,ii } );
fprintf( '\n' );
end
fprintf( '\nHamamatsu Info\n' );
a = imaqhwinfo( 'hamamatsu' );
fprintf( '%s %s\n', 'AdaptorDllName', a.AdaptorDllName );
fprintf( '%s %s\n', 'AdaptorDllVersion', a.AdaptorDllVersion );
fprintf( '%s %s\n', 'AdaptorName', a.AdaptorName );
num = size(a.DeviceIDs,2);
fprintf( ['\nDeviceIDs ',num2str(num),'\n'] );
for ii = 1 : num
fprintf( '%s', num2str(a.DeviceIDs{ 1,ii }) );
fprintf( '\n' );
end
fprintf( '\nDeviceInfo\n' );
fprintf( '%s %s\n', 'DefaultFormat', a.DeviceInfo.DefaultFormat );
fprintf( '%s %s\n', 'DeviceFileSupported', num2str(a.DeviceInfo.DeviceFileSupported) );
fprintf( '%s %s\n', 'DeviceName', a.DeviceInfo.DeviceName );
fprintf( '%s %s\n', 'DeviceID', num2str(a.DeviceInfo.DeviceID) );
fprintf( '%s %s\n', 'VideoInputConstructor', a.DeviceInfo.VideoInputConstructor );
fprintf( '%s %s\n', 'VideoDeviceConstructor', a.DeviceInfo.VideoDeviceConstructor );
num = size(a.DeviceInfo.SupportedFormats,2);
fprintf( ['\nSupportedFormats ',num2str(num),'\n'] );
for ii = 1 : size(a.DeviceInfo.SupportedFormats,2)
fprintf( '%s', a.DeviceInfo.SupportedFormats{ 1,ii } );
fprintf( '\n' );
end
fprintf( '\n' );
When I run in MatLab I get the following output:
InstalledAdaptors 5
gentl
gige
hamamatsu
matrox
winvideo
Hamamatsu Info
AdaptorDllName C:\Program Files (x86)\MATLAB\R2012b\toolbox\imaq\imaqadaptors\win32\mwhamamatsuimaq.dll
AdaptorDllVersion 4.4 (R2012b)
AdaptorName hamamatsu
DeviceIDs 1
1
DeviceInfo
DefaultFormat MONO16_2048x2048_SlowMode
DeviceFileSupported 0
DeviceName C11440-22CU, S/N: 002388, Bus: USB3
DeviceID 1
VideoInputConstructor videoinput('hamamatsu', 1)
VideoDeviceConstructor imaq.VideoDevice('hamamatsu', 1)
SupportedFormats 6
MONO16_2048x2048_FastMode
MONO16_2048x2048_SlowMode
MONO16_BIN2x2_1024x1024_FastMode
MONO16_BIN2x2_1024x1024_SlowMode
MONO16_BIN4x4_512x512_FastMode
MONO16_BIN4x4_512x512_SlowMode
Summary of Video Input Object Using 'C11440-22CU, S/N: 002388, Bus: USB3'.
Acquisition Source(s): input1 is available.
Acquisition Parameters: 'input1' is the current selected source.
10 frames per trigger using the selected source.
'MONO16_2048x2048_FastMode' video data to be logged upon START.
Grabbing first of every 1 frame(s).
Log data to 'memory' on trigger.
Trigger Parameters: 1 'immediate' trigger(s) on START.
Status: Waiting for START.
0 frames acquired since starting.
0 frames available for GETDATA.
When I run the EXE I get the following output:
InstalledAdaptors 5
gentl
gige
hamamatsu
matrox
winvideo
Hamamatsu Info
AdaptorDllName C:\Users\CV\AppData\Local\Temp\CV\mcrCache8.0\destin0\toolbox\imaq\imaqadaptors\win32\mwhamamatsuimaq.dll
AdaptorDllVersion 4.4 (R2012b)
AdaptorName hamamatsu
DeviceIDs 0
DeviceInfo
DefaultFormat Error using num2str (line 41)
Not enough input arguments.
The information from imaqhwinfo is the same in both cases.
The information from imaqhwinfo( 'hamamatsu' ) starts out the same but when I get to the DeviceIDs array it is empty.
I have set the Windows path as:
PATH=C:\Windows\SYSTEM32;^
C:\Windows;^
C:\Windows\SYSTEM32\WBEM;^
C:\JAVA\JRE\BIN;^
C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v80\runtime\win32;^
C:\Program Files (x86)\MATLAB\R2012b\toolbox\imaq\imaqadaptors\win32
I have put these DLLs into the directory with the EXE:
mwdcam63imaq.dll
mwdcamimaq.dll
mwhamamatsuimaq.dll
If anyone has any ideas what is wrong or what to try next please post a reply -- I'm running out of things to try...
Thanks!

1 commentaire

KAE
KAE le 2 Juin 2017
If you ever got this to work I'd love to know what you did.

Connectez-vous pour commenter.

Réponses (0)

Question posée :

le 8 Fév 2015

Commenté :

KAE
le 2 Juin 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by