Skip to main content
gamedev.net
🔒 Locked

Programmable Camera

Started by Swacky Jan 17, 2003 at 10:01 AM 2 replies 400+ views
Original Post
Swacky
Swacky
I''m still working on the hydroponics project and we are now ready to get a camera (My task was to build a robot that took pictures of strawberries so the pics can be processed and the surface area of the strawberries can be determined to measure growth). I need a video camera that I could pull stills from or a still camera that i could take pictures from. I have heard that there are programmable cameras, but so far they are all too expensive and useless for my application. I was wondering if there was any way to control a webcam and store pictures with meaningful names. I know that some webcams use a button that you hit to take a still picture, but do they automatically save it? If so, I could write an application relatively easily that would just sort the files for me after a servo (attached to a computer) clicks the button. If it has to be done through software, are there any resources for tapping into the video stream of a webcam?
S1CA
S1CA
Most webcams have SDKs available for them - for example I know that the Logitech QuickCams do. These make the process of capturing images and live streams and triggering the picture really simple.

http://www.logitech.com/index.cfm?page=partners/home&CRID=948&countryid=19&languageid=1

Some of their SDK samples even do some interesting processing on the captured data such as motion detection.

Other webcam vendors have SDKs available too.


Also take a look at Video For Windows which is an API which comes as standard with Windows and DirectShow for extended programability.

Finally there are budget and mid range digital cameras available from the usual vendors like Canon which are also programmable (actually, most digital cameras are programmable though the SDKs aren''t always publically available).


--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
Swacky
Swacky
Ok, thanks for the help. I got a Logitech Quickcam and the SDK. I think VB is the easiest language to make this work. The SDK is mostly a library of functions like PictureToFile(), StartMovieRecording(), StopMovieRecording(), etc.

Unfortunately, the code is all in VB 5 and I have .NET. Is it easy to translate between them (~200 lines of code)?
Swacky
Swacky
Well, apparently I didn''t have to do much translation. It was mostly just changing a few lines in the top of the constants file and figuring out how com objects work. I still can''t connect to the camera though. Has anyone ever worked with one of these before?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.