How to read a USB camera image into a program

How to read a USB camera image into a program

Post by Anders Joh » Fri, 22 Jul 2005 03:25:24

What is the best, simplest, and most generic way to read a
image from a USB camera? No jpg file import.
I want to press a button to take the picture, and then
immediately read it into the program, and save it in a database.

Thanks,
Anders J

 
 
 

How to read a USB camera image into a program

Post by Jens Grusc » Fri, 22 Jul 2005 05:41:44

> What is the best, simplest, and most generic way to read a

I think using Twain is the most simple way. At
http://www.yqcomputer.com/ you can find a good component, and
examples how to use it.

Jens

 
 
 

How to read a USB camera image into a program

Post by Ben Hochst » Fri, 22 Jul 2005 06:51:15


The official way is WIA (Windows Image Acquisition). I don't know whether
Twain is a wrapper around it or WIA's predecessor.

--
Ben
 
 
 

How to read a USB camera image into a program

Post by Jens Grusc » Fri, 22 Jul 2005 07:19:11

> The official way is WIA (Windows Image Acquisition). I don't know whether

Well, TWAIN is just a Thing Without Any Important Name...

While WIA might be more modern, TWAIN works very well with my USB
*** . I guess WIA probably has some advantages (video in addition to
still images?).

Jens
 
 
 

How to read a USB camera image into a program

Post by Ben Hochst » Fri, 22 Jul 2005 07:25:19


Oh, I didn't mean to belittle TWAIN. But not every thingy comes with a
TWAIN driver, and I thought I've heard rumours that TWAIN was to be given
up in favour of WIA (just as DOS was given up in favour of Win32. Check
your LAN boot diskettes and you'll see what I mean. <g>)

--
Ben
 
 
 

How to read a USB camera image into a program

Post by Ben Hochst » Fri, 22 Jul 2005 07:27:06


This just deals with getting the pix. I guess the Anders also wanted to
have the application push the shutter button etc.

--
Ben
 
 
 

How to read a USB camera image into a program

Post by Support » Fri, 22 Jul 2005 08:00:35

Subject: Re: How to read a USB camera image into a program

If you want to go the "ugly" way, you can always look at the USB as a disk. Then, monitor for new file(s) every x sec. When you find one, copy it locally and load it into an appropriate structure.

But IA is what you are probebly looking for..
 
 
 

How to read a USB camera image into a program

Post by Jens Grusc » Fri, 22 Jul 2005 08:11:38

> Oh, I didn't mean to belittle TWAIN. But not every thingy comes with a

Some things live longer than one might think. But since WIA does sound
interesting... do you have any links to articles, source code or components?

Jens
 
 
 

How to read a USB camera image into a program

Post by Ben Hochst » Fri, 22 Jul 2005 08:42:52


Except from what Bill Gates is giving us via MSDN, no.

--
Ben
 
 
 

How to read a USB camera image into a program

Post by Anders Joh » Fri, 22 Jul 2005 17:13:36

ight Ben.
I want to register customer data and a part of that is a portrait
of the indivividual in question.

I want to enter name, address, phone number etc and then click the
camera button on the form to take the picture and add it to the customer
file.

If possible I want to avoid dependencies on various drivers that need to
be installed for every possible camera. It should be pretty much like a
mouse.
Plug it in and use it.

If whatever is needed comes with Windows that would be perfect.

Thanks for all comments,
Anders J

"Ben Hochstrasser" <bhoc@tiscali123^H^H^H.ch> skrev i meddelandet
 
 
 

How to read a USB camera image into a program

Post by Ma Xiaogua » Sat, 23 Jul 2005 21:31:13

Hi Anders,

Please logon the following website:

http://www.yqcomputer.com/

Hope it helps.

Best regards.

Xiaoguang
 
 
 

How to read a USB camera image into a program

Post by Nils Haec » Sat, 23 Jul 2005 22:39:50

There's probably 3 ways

- Twain (as discussed before)

- Through the old VfW interface ("Video for Windows", see the AviCap example
before)

- Trough DirectX (see DelphiX and Omega)

It depends a bit on what interface your *** exposes by default. I found
most *** s still support the VfW stuff. Contact me by email (see website)
and I can send you a unit I use for the capturing with VfW.

I am doing a lot of image processing, and when you want to use a quality
camera (like a Sony handycam or better), you can also use

- Framegrabber, e.g. Falcon or Euresys, which usually comes with an API
- Firewire interface (CMU1394)

The images you acquire then are of much better quality then from a cheap
*** .

Hope that helps,

Nils Haeck
www.simdesign.nl