Firewire Camera Drivers and How to Develop with Them
by Guthrie Cooper |
| Free software, development kits and drivers are
available for the IEEE 1394 "Firewire" cameras. To get the camera up and
running, the Twian drivers may be installed and then use the "Imaging" software
built into Windows to preview and capture still frames. It is found here: Programs->Accessories->Imaging.
If you wish to develop with this driver, the best place to go is
www.twain.org. Here is an excerpt from the website explaining the steps
to capture a frame from the device.
|
"To develop very basic, simple, limited usage TWAIN application support, a
Visual Basic application could do the following:
-
Open the Data Source
-
Set MSG_XFERCOUNT to 1
-
Enable the Data Source modally (TW_USERINTERFACE.ModalUI set to TRUE)
-
Start a local message loop (using PeekMessage/GetMessage and TranslateMessage
Win32 APIs) to wait for the first message to come from the Source.
-
If MSG_XFERREADY is received, transfer one image then end the transfer.
-
Discard any pending transfers if there are any and disable the Data Source.
This means no complex capability negotiation, just one image transfer per
MSG_ENABLEDS/MSG_DISABLEDS sequence. If MSG_CLOSEDSREQ is received instead of
MSG_XFERREADY, consider the session canceled and disable the Data Source. Such
an application would need to load TWAIN_32.DLL and connect to its exported
DSM_Entry."
|
| However, if you are not a Twain type of person, then maybe
DirectShow is your bag. DirectShow WDM drivers are shipped with firewire
cameras and Microsoft provides a free development kit for their application.
Download the DirectShow SDK from the Microsoft web site.
|
| Two examples are described here. The first, AMCAP, connects
and shows a live preview and allows you to save a streaming avi to harddisk.
(I:\DX81SDK\DXF\DXSDK\samples\Multimedia\DirectShow\Capture\AMCap) The second,
StillCap, shows how to connect and save a still image to disk.
(I:\DX81SDK\DXF\DXSDK\samples\Multimedia\DirectShow\Editing\StillCap) All of
the source code to these two examples are provided. To help you get an understanding of the architecture
you may wish to refer to the tutorial titled "How to Interface With a Standard Video Frame Grabber".
|
| Finally, if neither of these appeal to you, freeware offered
by a studious group at Carnegie Mellon University may be of interest. The
robotics lab at Carnegie offers this freeware in an effort to usher in a new
era of mobile digital imaging necessary for computer vision. Check it out at:
http://www-2.cs.cmu.edu/~iwan/1394/
|
| If you are wondering how these different drivers are written,
you need to become familiar with the DCAM (DIGITAL CAMERA) specification. This
manufacturing specification is a guide for usage of the IEEE 1394 buss as the
protocol to control the camera and receive images. If you would like to
communicate with the cameras at this low level, go to
http://www.1394ta.com/ for information about this specification.
|
| Did you like this article or would you like to see another on a related topic?
Please let us know. |
|
|