| Video
Capture and TWAIN
Q.
Does Dosadi have any products or software specifically for video
capture?
A.
No. Our products are all built around the TWAIN standard, which
is a general purpose image-input standard. TWAIN can be used
to capture individual frames from many video sources, with important
limitations, see next question.
Q.
Can TWAIN be used to capture video frames, or whole movie clips?
A.
Yes, and No. TWAIN covers only the capture of still images,
the concept of a 'movie' does not exist in TWAIN.
You can use TWAIN to capture single frames from a video source,
assuming it has a TWAIN driver, which most do. This works well for
capturing a single frame interactively, where the user previews
the video stream and clicks a capture button. With some of
these drivers you can capture a frame without user interaction.
A few can capture multiple frames at perhaps 1 frame per
second. No TWAIN driver can capture directly to a movie file.
Q.
Well, if I can't use TWAIN, what should I use?
A.
We recommend you look first at Microsoft's
Video for Windows (VfW). This is an old API (dating back to
Win 3.1) but it remains well-supported by vendors, provides pretty
much everything you need for basic digital video input applications,
and has the virtue of being relatively simple, and accessible from
many languages with a little effort. Here's
a Microsoft
page with a 3-line VfW program in C. For VB programmers, try:
http://ej.bantz.com/video/
Or
you can use the DirectShow
API. It's COM, it's complicated, and it's badly documented even
by Microsoft standards. (But hey, it's way more powerful.)
You don't have to use it directly, there are free wrappers such
as DirectX.Capture,
VidCapture.
And there are commercial video capture controls such as CapturePRO,
IC Imaging Control,
LEADTOOLS
Multimedia.
Q.
We want to plug in a USB video camera, have a real-time preview
window, and capture frames under program control.
A.
For this problem, TWAIN is rarely the best choice. Not every video
device comes with a TWAIN driver. TWAIN doesn't let your program
select the video format e.g. 320x240 vs 640x480. If you have two
same-model cameras, TWAIN can't select between them. Usually the
only way to see a preview panel is by popping up the camera's 'Capture'
dialog.
If
for some reason you are determined to use TWAIN, contact Dosadi
support and ask about our Generic Video
Datasource. This is a universal TWAIN device driver for video
that provides optional video preview and allows application-controlled
single-frame capture (using Video for Windows of course).
|