PIONEERS IN IMAGE ACQUISITION
Leutron Logo, Link Home

 Daisy Library

Daisy is the principal part of the LV-SDS package, an interface to PicPort®/PicProdigy® frame grabbers. It is an object oriented C++ library providing an essential interface between the hardware and the user application.

Daisy highlights:

  • C++ class library (32bit DLL) for Windows XP/2000/NT4.0, Windows Me/98/95 and for Linux
  • supports MS Visual C++, Borland C++ Builder, Borland C++
  • realtime video capture
  • grabbing of image sequences
  • image conditioning, overlay
  • camera/grabber synchronization
  • connector management and other functions
  • Camera Editor to define non-standard cameras
  • multimedia drivers (TWAIN, Video for Windows, MCI)
  • automatic firmware update
  • reference manual, demo software, sample code
 
LV-SDS CD

Introduction

The Daisy library permits full utilization of the PicPort®/PicProdigy® frame grabbers' functionality whilst the Video for Windows and other multimedia drivers simplify the programming, but use only basic framegrabber functions.

Daisy is a C++ object oriented library, supplied as a set of DLLs in a 32-bit version for Windows XP/2000/NT4, Windows Me/98/95 and for Linux. The primary Daisy DLL is available in versions for MS Visual C++ and for Borland C++.

A non-object oriented interface for use with other programming languages is also available.

Actual hardware is represented by Daisy classes. The most important of these being LvGrabberNode and LvCameraNode. The developer typically creates instances of these classes in the application for each grabber and camera in the system then logically connects cameras to grabbers and activates them for selected targets.

Daisy Basics

Camera Configuration

Predefined setting of camera configurations for most of popular cameras are available. A camera definition is composed out of various predefined settings which include Video type, Color coding, Aspect ratio, Video timing, Signal coupling & synchronization, Asynchronous reset and other settings. Each of these items is composed by specific settings, which can be adapted by the programmer. Like this, a user can compose his own camera setting for special cameras.

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. Daisy itself will read during startup this camera description and set the hardware according to the definitions.

Camera Connection and Activation

Depending on the camera cable and the actual hardware, several cameras can be connected to the framegrabber at the same time. There are functions available to control the proper use of the available physical connectors and for activating one of the connected cameras.

Region of Interest (ROI) Configuration

The coordinates of the live video image and its pixeldepths on screen can be defined trough the ROI class. The ROI handling covers the whole video memory area, therefore an image may be acquired in the off screen area too. The Windows API covers only the on screen area of the video memory, the ROI class offers a possibilty for the user to access images outside the memory controlled by Windows.

Firmware Update

Each PicPort®/PicProdigy® board contains a firmware EEPROM which is updated automatically by the Daisy driver software ensuring compatibility between hardware and software releases.

Daisy Functions Overview

A brief list and description of the main Daisy functions with the PicPort®/PicProdigy® is as follows.

Color image adjustment: the image brightness, contrast, hue and saturation can be adjusted in real time by the PicPort®.

Input LUT: Look Up Table for various adjustments in a monochrome image (for example real-time binarization).

Scale and mirror modes: the PicPort® framegrabbers allow interpolative or pixel skipping downscaling and horizontal/vertical mirroring.

Lock Mask: for real time full color overlay with a Windows Device Independent Bitmap (DIB).

Color format: a subset of Windows supported color formats (8-bit, 15-bit, 16-bit, 24-bit, and 32-bit).

DIB/array mode: in DIB mode the live image in the CPU memory can be directly accessed by Windows API functions, i.e. SetDIBitsToDevice(), StretchDIBits(), etc. In array mode the image data is accessible in form of common 2D array.

Source ROI (Region Of Interest): selects a rectangle from the input.

Target ROI: represents a channel on the frame grabber (eg. High Performance Scaler HPS or Binary Ratio Scaler BRS on PicPort® boards) with its scaling, mirroring and locking capabilities.

Output to VGA/CPU memory: the target ROI can be mapped either to the VGA memory or to the system memory or both if required.

Camera/grabber synchronization: the card can behave as slave or master, grabbing synchronously or in an asynchronous mode (with triggering).

Opto-couplers: can be read, set or cleared in order to control or communicate with other external devices.

Connector management: the user application can freely switch between all available connectors of the boards.

Image grab: activates/deactivates desired camera node, puts it to the live/freeze mode.

Application synchronization: in 32-bit environment, Daisy is able to use the Win32 synchronization objects to signal various events, like start of odd/even field, vertical sync, status change in general port i/o, interrupts generated by frame grabber's onboard real time sequencer; this enables the user to fully utilize the advantages of Windows multithreading application architecture.

Other functions: a more comprehensive list of features can be found on our web site www.leutron.com.

Daisy Classes Overview

LvBoardDescr Board description
LvCPUWindow Information about video memory
LvCameraConnDlgInfo Data for DsyCamConnectInfoDlg()
LvCameraInfo Information data for cameras
LvCameraNode Represents any input equipment
LvCameraSignal Camera signal definition
LvCameraTiming Timing data for cameras
LvConnectionInfo Information about connectors
LvConnector Represent a connector for an external device
LvDevDescr Device description
LvExtDeviceInfo External device Region of interest
LvGrabberNode Represents a video grabber installed in the system.
LvLockMask Lock mask info
LvMemInfo Information about video memory
LvMonitorInfo Information data for monitors
LvMonitorNode Represents any output equipment
LvMonitorROIInfo Monitor Region of interest (placeholder for LvExtDeviceInfo)
LvROI Represents the Region Of Interest
LvROIInfo Information structure for ROI
LvSourceInfo Camera Region of interest
LvTgtBufferInfo Information structure for Target Buffers

LvCameraNode

Objects belonging to the LvCameraNode class represent the input equipment used to transfer in the video memory images from the outer world.

Activate Activates the camera
Freeze Puts the camera in 'freeze' mode
GetBrightness Retrieves the actual Brightness level
GetContrast Retrieves the actual contrast level
GetHandle Gets the handle associated with the camera object
GetHue Retrieves the actual Hue level
GetSaturation Retrieves the actual Saturation level
GetSourceROI Retrieves the actual area of interest
GetVideoTimingType Retrieves the Camera timing type
GetVideoType Retrieves the Camera type
IsConnected Checks if the camera is connected
IsLive Determines if the camera is in live mode
Live Puts the camera in 'live' mode
LoadLUT Load the input Look Up Table
SetBrightness Sets the Brightness level
SetContrast Sets the contrast level
SetHue Sets the Hue level
SetMirrorType Set the mirroring type for the incoming image
SetSaturation Sets the Saturation level
SetSourceROI Retrieves the actual area of interest
WaitSync Waits a synchronization signal on the selected input

LvConnector

Each camera can be connected to the grabber through an input connector; depending on the type of connector used, it will be possible to connect to the grabber a different number of camera types.

Each available connector is represented by a handle, that uniquely identifies the connector in the system; the user application, when connecting input devices should specify where the equipment will be physically connected in order to allow Daisy to perform the correct settings.

FreeConnector Frees the specified connector
GetConnectorInfo Returns informtion about the connector associated with the specified HCONNECTION
GetFreeInfo Returns information about the actually free connectors
GetNrFree Returns the number of free connector for a given video type

LvGrabberNode

Objects belonging to the LvGrabberNode class represent a video grabber installed in the system.

More than one grabber can be installed in the system, Daisy will provide different LvGrabberNode objects and each of them will act only on the physical board it represents.

Handles and connections

External equipment, like monitors and cameras, can be connected to a grabber; in its base concept a grabber supports more than one input and more than one output connections; so, in order to ask Daisy to operate on the correct equipment an application has to use handles. All the handles representing external equipment are of type HCONNECTION; for easier code readibility are also defined the HCAMERA and HMONITOR typedefs. Through a handle the application can still have a reference to the object it represents, so it can directly use its interface.

Monitors

More than one monitor could be connected to the hardware, of course if the hardware itself can support them; the actual implementation of the hardware can support only one monitor connection, so these methods are kept for future use; to maintain future compatibility also the user application are recommended to use the query methods instead of assuming a one-monitor system.

Actually Daisy takes care of connecting the monitor and of activating it during its initialization, so the application has not to deal with this system setting.

Input Connectors

In order to allow the end user to choose the input where the camera will be connected to, Daisy offers query methods to retrieve data about the connectors still free in the system; these information can be then presented to the end user that will choose the desired input; the connector descriptor maintains also a ASCII string that will match the description on the physical cable (i.e RGB1, YC_C1 and so on).

Cameras

The LvGrabberNode allows the user application to connect a camera to the grabber, activate or deactivate it. Each camera is represented in Daisy by a handle that uniquely identifies it in the system; the user can use this handle to refer to a specific input equipment when accessing other grabber methods. Knowing its handle, a user application can retrieve a pointer to each LvCameraNode object.

ActivateCamera Activates a previously connected camera.
ActivateMonitor Activates a previously connected monitor.
ActivateROI Moves the region of interest.
ConnectCamera Connects an input equipment to the grabber.
ConnectMonitor Connects an output equipment to the grabber.
DeactivateCamera Deactivates a previously connected and actiivated camera.
DisableVMemAccess Restores the grabber status after a direct video memory access.
DisconnectCamera Disconnects a previously connected camera.
EnableVMemAccess Prepares the grabber memory to be directly accessed by user application.
GetCameraPtr Gets a pointer to the specified camera object.
GetConnectedCamera Retrieves the handles of the input equipments currently connected.
GetConnectedMonitor Retrieves the handles of the output equipments currently connected.
GetConnectionInfo Retrieves information about a connection (camera or monitor)
GetConnectorName Retrieves the name of the connector where a camera is connected
GetConnectorType Retrieves the connector type detected on the grabber.
GetDeviceInfo Retrieves information about the associated grabber
GetFreeConnectorInfo Retrieves information about free input connectors.
GetMonitorPtr Gets a pointer to the specified monitor object.
GetNrConnectedCamera Retrieves the number of input equipment currently connected.
GetNrConnectedMonitor Retrieves the number of the connected monitors.
GetNrFreeConnector Retrieves the number of free input connectors.
LoadOutGreyScale Loads the output grey palette.
LoadOutPalette Loads the specified output palette.
RecheckConnector Perform the connector recognition procedure after startup.
RetrieveROI Retrieves the content of the defined region of interest.
SaveOutPalette Saves the currently set output palette.
SetScaleMode Sets the scale mode used for a camera.
SetVGAMode Sets the specified VGA mode
StoreROI Retrieves the content of the defined region of interest.
UpdateLockMask Updates the lock mask for the specified camera

LvROI

A Region Of Interest, also called ROI, is a rectangular part of video memory formatted with a specific color coding, that can be different from the actual output formatting, depending on the use the application wants to do of this memory; for example, an incoming image is placed in a ROI and also the output screen is a ROI.

The user application can retrieve from Daisy information about the ROI currently active, those related with external equipment connected to the grabber, so that it can access that part of memory interpreting in the right way the data stored in it. A ROI is defined by its position in the Video memory, by its dimensions and by the color coding used to generate it. A user application can generate and use its own ROI, in order to store in the Video Memory application related data.

A ROI is defined in the system by the LvROIInfo structure; since exists a strict relationship among the content of its fields, Daisy provides the LvROI class that can be used by the application to manage the LvROIInfo data in order to be sure that the content of their fields is coherent. All the LvROIInfo attributes remain 'public', so that the reading access to them can be a little bit faster, but the user application is strongly recommended to use the methods provided by LvROI to set those attributes in order to have them coherent.

GetArea Retrieves the actual dimension of a ROI
SetMemoryWidth Specifies the width of the physical memory
SetHResolution Specifies the width of the display memory
SetColorFormat Sets the color format which the roi represents
SetDimension Sets roi dimension
SetStartPosition Sets the start position of the roi in the memory
SetLockMask Set Lock mask properties for the ROI
SetROIInfo Sets the content of the ROI

Multimedia Drivers

Twain Driver

Twain defines a standard software protocol and application programming interface (API) for communication between software applications and image acquisition devices. The Daisy library supports the Twain interface by providing a general purpose driver that can be used to acquire images from any application supporting Twain (including Microsoft Office, CorelDRAW family and many other ones).

Video for Windows Driver

The Leutron Video for Windows driver provides image capture functionality and can be used alone or in conjunction with other Video for Windows components, i.e. audio/video compressors and audio capture devices to manipulate complete multimedia streams. It is available for Windows XP/2000/NT4.0 only.

MCI Driver (available on request)

The Windows Media Control Interface (MCI) provides an interface for controlling multimedia devices. Functionality of Leutron MCI driver is accessed by means of standard Windows MCI calls, typically by sending a command string by the mciSendString() function.

The scope of the driver mainly covers the display of live images, freezing, storing to clipboard, etc.

Complementary and Related Products

LV-SDS

Daisy is the main part of Leutron Vision Software Development Suite (LV-SDS). LV-SDS is the primary software interface to Leutron's PicPort® and PicProdigy® frame grabbers. Besides Daisy, the most important parts of LV-SDS are:

Orchid
High level library for developing interactive applications with a few lines of code in visual tools like Microsoft Visual Basic, Borland Delphi, Borland C++ Builder, etc. Available as a DLL or as an OCX component.
Camera editor
Interactive application allowing simple setup of standard and non-standard cameras.
DRAL
Extension libraries for Daisy providing real-time functionality of PicPort®/PicProdigy® frame grabbers.

Third Party Image Processing Software

Several well-known third party packages for real-time image processing and analysis are also supported. The packages include HALCON, Activ Vision Tools, NeuroCheck, and others. Please refer to our detailed software brochure (PDF) for more details.

Leutron Frame Grabbers and LVmPC®

PicPort® & PicPort®-Pro Frame Grabbers
High quality, cost effective frame grabber line providing interface to various camera types: standard analog (color and monochrome), non-standard analog, LVDS, Camera Link. PicPort®-Pro is a new board series based on FPGA architecture. Please refer to the product catalog to learn more about individual board types.
PicProdigy® Frame Grabbers
High-end frame grabber line with similar architecture like PicPort®-Pro boards, but providing some additional high-end features, especially on-board algorithm accelerators. Please refer to the product catalog to learn more about individual board types.
LVmPC®
Ultra compact, mobile image processing system for industrial and machine vision, based on standard PC technology and Leutron's PicPort®/PicProdigy® frame grabbers.

Ordering Information

Ordering number Product Description
16028 LV-SDS Software Development Suite containing Daisy, DRAL, Orchid, TWAIN, Video for Windows and other multimedia drvers, Camera Editor, detailed documentation, demo software and sample code.
Complementary products
××××× Leutron Vision Hardware To get ordering information for Leutron Vision hardware products, especially PicPort®, PicPort®-Pro, and PicProdigy® frame grabbers and LVmPC® system, please refer to information for relevant product. Information pages for all the hardware products are accessible from the product catalog.

Specifications are subject to change without notice or obligation.
All trademarks are the property of their respective owners.
Copyright © by Leutron Vision.
Last update: June 2003.