View Full Version : Help On Camera Interfacing With Computer

08-19-2007, 08:14 PM
maybe this is oput of bounds .I am sorry but couldnt help it.

Could anyone guide me regarding how to capture an image using a USB webcam in visual basic?Is it possible to use a digital camera for the same purpose?They are generally configured as USB mass storage devices and hence can view only saved photos.
What i want is to get a picture when i issue a command.It is for controlling a bot by image processing.
I googled a lot but couldnot find specific information about the standard commands to be issued to a webcam so as to get the results.Could anyone just help me about where to get those details.
Currently I can send and receive data from any usb device with my VB programm.

Please help me..............

08-19-2007, 08:39 PM
I have a Canon A640, which came bundled with a nice software that controls the camera from the PC. It shows a viewfinder on the PC screen instead of the camera. You can click images and it can store either in the camera memory or directly to the PC. Its 10 megapixel with a goodish lens, so the image quality is much better than that of a USB webcam. Almost all Canon camera models come with this kind of software (but you should still check before buying a particular model).

To control Olympus cameras from your PC, you will need to use this software: www.akond.net.

PC control software for Nikon cameras are expensive, so you may want to avoid them.

Mohit Mahajan,

08-19-2007, 09:58 PM
Sorry But Probably I was not clear enough........I bascically need the know-how to write the software to control the camera and not a software.........

08-20-2007, 12:28 AM
Here are some of the options you may try:

Framecap: http://www.robinhewitt.com/framecap/index.html
Codevis: http://www.codevis.com/vidcapture/
VideoOCX: http://www.videoocx.de/

Also you may try out the roborealm API or extensions: http://www.roborealm.com

08-20-2007, 08:19 AM
Google for openCV.
It's an open source Image processing library developed by Intel.Very easy.Supports USB webcams and used alot in robotics including my lab :)

08-20-2007, 07:42 PM
As Jerry said.. u can use OpenCV...
OpenCV doesnt only captures the webcam.. Its bundled with numerous functions helping in processing the captured frames..
but to use it you need to have a good command over windows programming in C..
if u want to stick with VB.... use Video for windows.. which is a set of APIs provided by microsoft for ease of using video...
go thru the api capCreateCaptureWindow..capVideoStreamCallback

its tooo slow to process in pixel by pixel in VB... try to move towards VC++..


08-20-2007, 08:01 PM
you can find a example here....
this will work with any webcam either USB or Parallel port (u dont see them these days)...
have that as a reference.... its inefficient...
use the callback function instead...


08-21-2007, 07:41 AM
Thanks Guys,You Have been really helpful.
As quaser said.......I would really like to move to C++.But its easier to create interface in VB .So what I would like to do is create interface in VB and Use C++ for coding solving.If someone could point to a good tutorial on communication between two programs and method of exchange of data between them it would really help..............

08-21-2007, 12:38 PM
there are lots of ways to do it...
activex controls... dlls..
Dont go thru those stuffs right now..
just start with image processing in VB....