ST-402 64-bit sbigudrv.dll available?

Discussion in 'STF Series CCD Cameras' started by simple17, Jun 15, 2015.

  1. simple17

    simple17 Standard User

    Joined:
    Jun 15, 2015
    Messages:
    2
    I have an ST-402. I've written several MATLAB script that allow me to read images directly into MATLAB arrays (let me know if anyone would like a copy of my MATLAB scripts). Recently my lab computer was upgraded to Windows 7 64-bit along with MATLAB 64-bit due to memory limitations of 32-bit systems. I have SBIGDriverChecker64 installed and the camera works with CCDOps. MATLAB 64-bit however can no longer load the DLL file. It appears sbigudrv.dll is still a 32-bit library which can not be loaded into MATLAB's 64-bit process (MATLAB forums claim it's a Windows limitation). Currently running sbigudrv.dll version 4.88 Build 2 04-24-15. Is there a 64-bit version of this dll available?
     
  2. Adam Robichaud

    Adam Robichaud Lead Developer Staff Member

    Joined:
    Sep 29, 2014
    Messages:
    1,017
    Location:
    Ottawa
    Unfortunately, the SBIG Driver Checker 64 is "64" in name only, and SBIGUDrv is not 64-bit capable (nor do we have any plans to make it so as of this moment, as it's an extremely involved job). There are ways of interfacing 32-bit dll's with 64-bit processes – but the process is not at all elegant, and admittedly a pain. See: http://stackoverflow.com/questions/2265023/load-32bit-dll-library-in-64bit-application Sorry.

    Tim Puckett and I are interested in seeing what you've done with MATLAB, though. If you want to keep the source code private we can go through private messages.
     
  3. simple17

    simple17 Standard User

    Joined:
    Jun 15, 2015
    Messages:
    2
    I may have to switch my lab computer to Linux. The multiarch support seems to work much better than Windows. My MATLAB scripts work fine in Ubuntu 14.04 64-bit with Matlab 64-Bit using libsbigudrv.so . The problem is the Air Force has an unnatural fear of all things open source even on non-network stand alone lab computers.

    The MATLAB fuctions are very basic and have only been used with my ST-402, but in theory they should work for any camera supported by SBIGUDrv.dll. This only connects to a single camera over USB.

    Just place the three MATLAB scripts in a folder with SBIGUDrv.dll (or libsbigudrv.so for linux) along with sbigudrv.h. Add the folder to the MATLAB path. Edit the "loadlibrary" command in SBIG_Open.m and make sure it points the the library file and the header file.

    SBIG_Open() % run first to connect to load the library in MATLAB, open the driver, and connect to the cammera
    [PAR_ERROR,ImageData] = SBIG_Capture(ExposureTime,BinMode) % Captures image from camera in the ImageData array, BinMode other than zero doesn't seem to produce expected image
    SBIG_Close() % run this at the end of your MATLAB script, closes driver, unload library from MATLAB

    I was debugging the BinMode a few months ago. So SBIG_Capture may or may not work as expected. It's hard for me to test at the moment with my lab computer unable to load the dll file.

    This can be shared with anyone interested, but with the usual "use at your own risk" caveat.

    -Ken
     

    Attached Files:

    Ramin Shomali likes this.
  4. Adam Robichaud

    Adam Robichaud Lead Developer Staff Member

    Joined:
    Sep 29, 2014
    Messages:
    1,017
    Location:
    Ottawa
    Thanks for sharing!
     

Share This Page