Sensicam for Linux

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Sensicam for Linux

Martin Kielhorn
Hi,
I am trying to get the Sensicam working in Linux.

PCO sent me a kernel module and a Linux SDK which differs from the Windows SDK.

I wrote wrappers for all the functions of the Windows SDK that the DeviceAdapter calls.

It should be included into micromanager1.3/DeviceAdapters/Sensicam/Sensicam.cpp like this:
#ifdef linux
#include "SensicamL.h" // wrapper for Linux library
#endif

However I can't figure out what changes I have to make to get it compiled
and I also have to add a "-lsensicam" to the LD_FLAGS.
I guess it is in some configure.in.

Maybe someone on this list knows the answer.

Thanks,
Martin

--
Martin Kielhorn
Randall Division of Cell & Molecular Biophysics
King's College London, New Hunt's House
Guy's Campus, London SE1 1UL, U.K.
tel: +44 (0) 207 848 6519,  fax: +44 (0) 207 848 6435

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

SensicamL.h (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Sensicam for Linux

Nico Stuurman-4
Hi Martin,

I am trying to get the Sensicam working in Linux.

However I can't figure out what changes I have to make to get it compiled
and I also have to add a "-lsensicam" to the LD_FLAGS.
I guess it is in some configure.in.

I changes DeviceAdapters/configure.in, DeviceAdapters/Makefile.am and DeviceAdapters/Sensicam/Makefile.am in an attempt to make this work for you.  Update from the repository and you should get these changes.  You will need to edit the file DrviceAdapters/configure.in and edit lines 96 and 97, and provide a filename there that is unique to the sensicam code you received from PCO (i.e., only build when you have this file).  Hopefully, doing a make will then build your code.

The -lsensicam is added in the Sensicam/Makefile.am file.

Best,

Nico



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Sensicam for Linux

Martin Kielhorn


2009/9/25 Nico Stuurman <[hidden email]>
Hi Martin,

I am trying to get the Sensicam working in Linux.

However I can't figure out what changes I have to make to get it compiled
and I also have to add a "-lsensicam" to the LD_FLAGS.
I guess it is in some configure.in.

I changes DeviceAdapters/configure.in, DeviceAdapters/Makefile.am and DeviceAdapters/Sensicam/Makefile.am in an attempt to make this work for you.  Update from the repository and you should get these changes.  You will need to edit the file DrviceAdapters/configure.in and edit lines 96 and 97, and provide a filename there that is unique to the sensicam code you received from PCO (i.e., only build when you have this file).  Hopefully, doing a make will then build your code.

The -lsensicam is added in the Sensicam/Makefile.am file.

Okay thanks.


--
Martin Kielhorn
Randall Division of Cell & Molecular Biophysics
King's College London, New Hunt's House
Guy's Campus, London SE1 1UL, U.K.
tel: +44 (0) 207 848 6519,  fax: +44 (0) 207 848 6435

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Sensicam for Linux

Martin Kielhorn
Hi Nico,
it took a while but finally I've incorporated all my changes and got the camera running (somewhat) in Micromanager under Ubuntu 9.10 x86.

In contrast to the Windows SDK all the functions in the Linux SDK are lower-case and they expect a handle to the board as a first argument. As I only have one board I didn't bother to implement it for several boards.

It only works with 16 bit data output (contains 12 bit from camera).
Also I couldn't use GetTickCount() in CSensicam::SnapImage(), so if something goes wrong it might freeze Micromanager.

However I was able to capture some images with it.


You'll start with the SDK from PCO:
martin@cyberpower:~/src/sen2_02_11$ ls
coc_i386    COPYING   pb525002.bit  Readme.txt  sencam_env  sendrvh  sentest
coc_x86_64  Makefile  pco.rules     sencam_buf  sendrv      senlib

It contains a module (pco52x.ko) and libsenlib.so.
The module will provide you with /dev/sensicam_0/cam that will be opened by libsenlib.so. The library uploads the file pb525002.bit to the camera and handles all the low level communication.

When everything is compiled you can start micromanager with:
martin@cyberpower:/usr/share/imagej$ export PCOPB=/home/martin/src/sen2_02_11/pb525002.bit
martin@cyberpower:/usr/share/imagej$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/micro-manager/
martin@cyberpower:/usr/share/imagej$ java -jar ij.jar

Depending on how motivated I am I might to clean up the code.
I hope that it doesn't contain serious memory leaks.

I also have a little test program that only depends on libsenlib.so that allows to use very short integration times (I down to 500 ns). It might be useful to have that in Micromanager as well.

The handfull of files that I had to change are attached as an archive.

Regards, Martin

--
Martin Kielhorn
Randall Division of Cell & Molecular Biophysics
King's College London, New Hunt's House
Guy's Campus, London SE1 1UL, U.K.
tel: +44 (0) 207 848 6519,  fax: +44 (0) 207 848 6435

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

DeviceAdapters.tbz (15K) Download Attachment