I located the MCRInstaller on our distribution of MATLAB on the Ubuntu machine (/MATLAB_R2009b/toolbox/compiler/deploy/glnxa64/MCRInstaller.bin). I ran the installer, as root,and followed the default options to install it. Next I updated the .bashrc file to include the necessary pointers to various libraries:
I've downloaded the test_HS binary from the SVN and added the ~/test_images/ directory as recommended by Won. I then ran the code by entering ./test_HS ~/test_images/
The code ran successfully through the serial_cmd access and the image acquisition process and only crashed when it tried to access the variable mes_message. This indicates a run-time error, not a compilation error. If you examine lines 751 and 752 of HS_Camera.m you can see the typo (mes_meesage vs mes_message) in the code that is the source of the error:
mes_meesage = ['Intensity too high: ',fobj.name];
Here's the output:
:~/Hartmann_Sensor_SVN/users/won/compiled_code/test_HS/test_HS/distrib$ ./test_HS ~/test_images/
The camera is accessible.
G E N E R A L C A M E R A S E T T I N G S:
Camera Model No.: DS-22-01M60-11E
Camera Serial No.: 04437062
Sensor Serial No.: 0411218
Tap 1 Gain: 0
Tap 2 Gain: 0
Firmware Design Rev.: 03-81-00070-03 Sep 30 2004
DSP Design Rev.: 17.3
Video Mode: Normal Operating Mode
Data Mode: 12 bit
Binning Mode: 1x1
Gain Mode: 1x Output Gain Mode
Output Configuration: 2 Tap
Exposure Control: enabled
Exposure Mode: 2
SYNC Frequency: 8 Hz
Exposure Time: 123646.66 uSec
executing /opt/EDTpdv/take -s 1 -l 10 -f /home/controls/test_images/test ...
??? Undefined function or variable "mes_message".
Error in ==> HS_Camera>HS_Camera.read_raw at 752
Error in ==> HS_Camera>HS_Camera.read_from_folder at 668
Error in ==> HS_Camera>HS_Camera.read_from_fg at 721
Error in ==> HS_Camera>HS_Camera.read_images at 590
Error in ==> test_HS at 9
Build an application that uses HS classes
I wrote a simple script test_HS.m that takes and saves 10 images using the camera, averages the images and finds centroids. Thus the script requires the class files HS_Base, HS_Camera, HS_Image, and HS_Centroids.
I added those four class files by right-clicking Other Files (found below Main function) then choosing Add File, then clicked the build icon.