Before the rush

Before the rush
by evan-pak

Submit your Photo
Hall of Fame

Please participate in Meta
and help us grow.

Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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 – David Rouse Jan 30 '12 at 19:15
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. – Perishable Dave Jan 31 '12 at 23:43

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.

share|improve this answer

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.

share|improve this answer

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

share|improve this answer
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. – jrista Feb 1 '12 at 21:47 – Unapiedra Feb 2 '12 at 9:28
@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. – Michael Allen Feb 2 '12 at 9:47

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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