Introduction
Direct Capture is a library
implementing a higher level interface between the Daisy
library and the application. It is suitable for user friendly applications
where the user wants to
-
see the live image on monitor
and/or grab it to the main memory,
-
scale, clip or mirror it,
-
modify its properties i.e.
brightness, contrast, hue, and saturation,
-
set overlay text (monitor
only), or create a Lock Mask,
-
freeze/unfreeze the image,
respond to Windows events,
-
store the image to a BMP
file or to the clipboard.
Although most of this functionality
is provided directly by Daisy, Direct Capture significantly simplifies
these tasks and brings one additional important feature by solving the
live window management. Normally, when the live image data flow is directed
to the VGA memory by means of a DMA transfer, it overwrites everything
in the rectangle on the screen specified in absolute coordinates. This
problem is overcome using Direct Draw in addition to the Windows Direct
Draw function.
Direct Capture is language
independent DLL; it can be used in visual tools as Visual Basic, Borland
Delphi as well as in traditional MS Visual C++ or Borland C++. It is suitable
for creating user interactive applications rather than for machine vision
applications.
Direct
Capture Basics
On Screen
Windows
The On Screen Window object
is provided for the display of live video on the Widows NT desktop. The
On Screen Window objects is created by passing the handle (HWND) of a Windows
NT window into the LvDcCreateOnScreenWin function. Direct Capture takes
the Windows NT window handle and subclasses it to take control of the window.
Subclassing is the technique where by all windows message generated for
a window will now be handled by the software which subclassed the window,
in effect taking over control of the window. The LvDcCreateOnScreenWin
will pass back a handle (HDCVIDEOWIN) of the newly created On Screen Window
object. This handle must be used in all future to calls to the Direct Capture
library to manipulate the On Screen Window.
Off Screen
Windows
The Off Screen Window object
is provided to direct live video to system memory. The Off Screen Window
Object is created by calling the LvDcCreateOffScreenWin function which
will pass back a handle to the newly created window (HDCVIDEOWIN). Like
the On Screen Windows all function calls which manipulate the Off Screen
Window require the handle returned from the create call.
Direct
Capture Components
Direct Capture consists
of two separate DLL's, the DSYCTL.DLL and the CAMDLG.DLL. The DSYCTL.DLL
contains all the functions for creating and using the On and Off Screen
Window objects and the CAMDLG.DLL contains the routines to select grabbers
and cameras to connect to the window objects. The C source code for the
CAMDLG.DLL library is provided so that the users can customize the dialog
as they wish.
Camera
Configuration
Predefined setting of camera
configurations for the most popular cameras are available.Leutron Vision
offers a Camera Editor which
assists you in defining your own cameras. The Camera Editor produces a
datafile with the detailed camera description. Direct Capture itself will
read during startup this camera description and set the hardware according
to the definitions.
Direct
Capture Functions
Overview
The following is a list
of features that are supported by the On and Off Screen windows and a description
of each.
Scaling
Both the On and Off Screen
Windows support scaling. When scaling is enabled the cameras field of view
will be scaled to fit the size of the window on screen or in memory. For
example, if the size of the window is set to 150×150 pixels and a
video source with a field of view of 576×452 is being used the entire
image will be scaled down to 150×150 for display or capture.
Clipping
Both the On and Off Screen
Windows support clipping.With clipping only the portion of the video that
will fit within the size of window will be displayed or captured to memory.
For example, if the size of the widow is set to 150×150 pixels and
a video source with a field of view of 576×452 is being used only
a 150×150 pixel window will be displayed or captured.
Mirroring
Both the On and Off Screen
Windows support mirroring along the vertical, horizontal or both axis.
Text Overlay
The On Screen Window supports
overlaid text.Overlaid text allows the user to overlay individual character
strings on the live video. The font, size, color and position of the character
string can be specified and changed through the Direct Capture library.
User Masks
Both the On and Off Screen
Windows support user masks. A user mask is a one bit plane deep bit map
that can be overlaid on the video. The mask can be created and manipulated
via standard WIN32 function calls. Also the user can specify that the mask
should be stretched to match the size of the video.
Copying
to Clipboard
Both window types support
the copying of the video to the Window NT clipboard. For On Screen windows
when the image is copied to the clipboard the current video card image
format is used to determine the format of the image, i.e. when the desktop
is at 1280×1024 by 8 bits the image will be copied to the clipboard
in 8bit color format. For off screen windows the format of the image copied
to the clipboard can be set using the LvDcSetColorFormat function. If there
is a user mask set and enabled for either window it will also be copied
to the clipboard. Currently overlaid text is not copied to the clipboard.
Getting
Image as Bitmap
Both windows support the
retrieval of the video as a windows BMP. In the case of the On Screen Windows
the color format of the BMP will match the current Windows NT desktop setting.
For Off Screen Windows the format of the image retrieved can be set using
the LvDcSetColorFormat function. As with LvDcCopyToClipboard any user mask
that has been enabled will be copied but overlaid text will not.
Adjusting
Picture Controls
Both windows support the
adjustment of brightness, contrast, hue and saturation.
Events
and Triggers
On Screen Window objects
can be configured to respond to Windows NT user interface actions and Off
Screen Window objects can be configured to trigger on certain On Screen
Widow actions.
On Screen Window objects
can be configured to enter the live video mode when the video window receives
the desktop focus or only when it is the top most window. Like wise it
can be configured to freeze the video when it loses focus or is covered
by other windows. Also Off Screen Windows can be configured to go into
live mode after an On Screen Window freeze.
Window
Assosiation
Off Screen Window objects
can be associated with On Screen Window objects. This allows a Off Screen
Window to be configured to track the resize mode, color format, mirror
mode, live state, and freeze state of a selected On Screen Window . This
will give the user the ability to have the video in system memory track
the on screen video as closely as possible.
Complementary
and Related Products
LV-SDS
Direct Capture is a part of Leutron Vision Software
Development Suite (LV-SDS). LV-SDS is the primary software interface to
Leutron's PicPort® framegrabbers. Besides the Direct Capture,
the most important parts of LV-SDS are:
-
Daisy
-
Object oriented C++ library providing an essential
interface between hardware and the user appication.
-
Camera editor
-
Interactive application allowing simple setup
of standard and non-standard cameras.
-
Real-time
Image Sequencer
-
Allows acquiring image sequences to the CPU memory.
Image processing
libraries
Please check the image
processing libraries section to learn more about the Leutron's PicLab32®
library for image processing and analysis and about several other well-known
third party software products supported by Leutron's hardware.
PicPort®
framegrabbers and PentiCam®
-
PicPort®-Color
-
Low cost framegrabber providing studio quality
digitization and conditioning of color (PAL or NTSC) video image.
-
PicPort®-Mono,
PicPort®-Stereo
-
Framegrabbers for monochrome acquisition (CCIR/EIA/nonstandard),
with five sync modes and asynchronous acquisition. PicPort®-Stereo
moreover provides second digitizing channel allowing simultaneous acquisition
from two synchronized cameras or acquisition from a dual-channel camera.
-
PentiCam®
-
Ultra compact, mobile image processing system
for industrial and machine vision, based on standard PC technology and
Leutron's PicPort® framegrabbers.
Ordering
Information
| Ordering number |
Product |
Description |
| 16028 |
LV-SDS for PicPort® |
Software Development
Suite containing Daisy library, DRAL, Direct Capture, TWAIN, Video
for Windows and other multimedia drvers, Camera Editor, detailed documentation,
demo software and sample code. |
| Complementary
products |
| 1100× |
PicPort®-Color-X |
Various models of
the PicPort®-Color family. Please check the PicPort®-Color
detailed ordering information. |
| 1101× |
PicPort®-Mono-X |
Various models of
the PicPort®-Mono family. Please check the PicPort®-Mono/Stereo
detailed ordering information. |
| 1102× |
PicPort®-Stereo-X |
Various models of
the PicPort®-Stereo family. Please check the PicPort®-Mono/Stereo
detailed ordering information. |
| |
PentiCam®-X |
Various models of
the PentiCam® family. Please check the PentiCam®
detailed ordering information. |
|