9
\$\begingroup\$

I am currently building a machine that should take picture of small insect parts from a test tube. Parts are dropped to the test tube and the camera should trigger and take pictures while they drop in fluid inside the tube.

However, there are problems to select the correct kind of camera. Real "machine vision" cameras are very expensive and their optics (and camera itself) are basically crap. Common system cameras are superior in sense of picture quality. However, programming custom software for PC may be a problem.

So the question is: Is there any cameras in the market that does have any kind of open (well defined) interface to control them directly from a PC?

Edit: Found that there are SDK for some of Canon camera models. Does anyone have experience with it? Can you control the camera completely with it and even stream video when needed?

\$\endgroup\$
2
  • \$\begingroup\$ Not an answer really, but at least Canon and Nikon have SDKs which you can apply for. I haven't looked at the licensing, but I have a feeling it won't be GPL friendly. You might want to see if someone has reverse-engineered a library that would also work -- also hdrlabs.com/occ/index.html \$\endgroup\$ Jan 30, 2012 at 19:15
  • \$\begingroup\$ You can control the camera remotely and stream video with the Canon SDK. The only problem is that you have to apply for a license. It took me a few times to actually get it. You'll need to read the licensing carefully to make sure you're within their terms of use. Oh and, the Canon SDK is in C (or was it C++?), but there are a few wrappers out for it. If you're familiar with C the SDK should be relatively easy to work with. \$\endgroup\$ Jan 31, 2012 at 23:43

4 Answers 4

3
\$\begingroup\$

I don't know about an open interface for cameras, but there may be another solution to your problem.

Something like TriggerTrap may be a good option for you. Hook a laser that shines though the tube onto a light sensor that's hooked up to the TriggerTrap and set it to go off when the beam is broken.
This is how some high speed photography is done.

\$\endgroup\$
1
\$\begingroup\$

Magic Lantern custom firmware for Canon camera has an option to take pictures using motion detection. You can specify a custom sensitivity range for this option but I am not sure if it will be sensitive or fast enough for you.
If you already own a compatible camera you can try it out. It will not cost you anything since the custom firmware is free.
if you want to go further, you could always download the source code for the firmware and customize this particular function.

\$\endgroup\$
1
\$\begingroup\$

The Canon Hackers Development Kit is a pretty robust custom firmware that may be able to perform the functions you need. It allows you to script the camera using Lua to perform Motion detection, Video streaming etc.

CHDK Canon Hackers Development Kit

\$\endgroup\$
3
  • \$\begingroup\$ I've removed your link, as it appeared to be very suspiciously formatted. We won't accept any attempts to hack or spoof or otherwise cause any form of harm to our readers. If you have a legitimate link, please use it. If you replace the suspicious link, we will have to take a more drastic response. \$\endgroup\$
    – jrista
    Feb 1, 2012 at 21:47
  • \$\begingroup\$ chdk.wikia.com/wiki/CHDK \$\endgroup\$
    – Unapiedra
    Feb 2, 2012 at 9:28
  • \$\begingroup\$ @jrista - That link was taken from google! How less suspicious could it be? EDIT: Ah I've looked at the link and it was infact a piece of Objective C. Must have been left over in the Clipboard from an iPhone app I'm working on. \$\endgroup\$ Feb 2, 2012 at 9:47
-1
\$\begingroup\$

Most cameras implement the ptp protocol for access to files and control. There are several interfaces that use the ptp protocol. Under Linux there is e.g. gphoto2 as a commandline tool that can control many aspects of most digital cameras have a look into that, maybe there is also a windows prto if you want to take control from windows.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.