MATLAB IMAGE ACQUISITION TOOLBOX - RELEASE NOTES Betriebsanweisung

Stöbern Sie online oder laden Sie Betriebsanweisung nach Software MATLAB IMAGE ACQUISITION TOOLBOX - RELEASE NOTES herunter. MATLAB IMAGE ACQUISITION TOOLBOX - RELEASE NOTES User`s guide Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 172
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen

Inhaltsverzeichnis

Seite 1 - User's Guide

Image Acquisition Toolbox™ Adaptor KitUser's GuideR2015a

Seite 2 - How to Contact MathWorks

x ContentsTest Suite Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-16

Seite 3 - Revision History

5 Acquiring Image Data5-22Your thread function must accept a single parameter, which is defined as a pointer tothe object itself, i.e., the this point

Seite 4

Implementing the Acquisition Thread Function5-23 } // while(isAcquisitionNotComplete() break; } //switch-case WM_USER

Seite 5 - Contents

5 Acquiring Image Data5-24Supporting ROIsThe toolbox supports the specification of regions of interest (ROIs) in both software andhardware. The follow

Seite 6 - Defining Your Adaptor Class

Supporting ROIs5-25Note You use the ROI width and height when you create the frame but you use the fullimage width and height when you copy the image

Seite 7

5 Acquiring Image Data5-26} // if isSendFrame()Implementing Hardware ROIFor hardware ROI, the user defines the ROI on the device. The device returns o

Seite 8

Supporting Hardware Triggers5-27Supporting Hardware TriggersThe toolbox supports three types of triggers:• Immediate — Trigger fires when video input

Seite 9

5 Acquiring Image Data5-28Main Acquisition Loop with Test for Hardware TriggerExampleThe following is an acquisition thread function that includes a c

Seite 10

Supporting Hardware Triggers5-29 // Add code here to configure the image // acquisition device for hardware

Seite 11 - Getting Started

5 Acquiring Image Data5-30Using Critical SectionsThis section describes how to use critical sections to protect portions of your adaptor code.The sect

Seite 12 - Custom Adaptors

Using Critical Sections5-31The auto critical section object ensures that you always exit a critical section. However,you must also ensure that the au

Seite 13 - What Knowledge Is Required?

1Getting StartedThis section introduces the Image Acquisition Toolbox™ Adaptor Kit.• “Custom Adaptors” on page 1-2• “Creating an Adaptor” on page 1-4•

Seite 14 - Creating an Adaptor

5 Acquiring Image Data5-32done. Insert this code just before the acquisition thread function breaks out of theframe acquisition loop — see “Implementi

Seite 15 - Creating an Adaptor

Specifying Device Driver Identification Information5-33Specifying Device Driver Identification InformationTwo of the virtual functions you must imple

Seite 16 - 1 Getting Started

5 Acquiring Image Data5-34const char* MyDeviceAdaptor::getDriverVersion() const { return "1.0.0";}

Seite 17 - Looking at the Demo Adaptor

6Defining Device-Specific PropertiesThis chapter describes how to define the properties that toolbox users can use toconfigure various attributes of a

Seite 18

6 Defining Device-Specific Properties6-2Defining Device-Specific PropertiesYou define which properties of your image acquisition device you want to ex

Seite 19 - Setting Breakpoints

Defining Device-Specific Properties6-3 Device Specific Properties: Brightness = -10 Contrast = 266 Exposure = 1024 ExposureMode = auto

Seite 20

6 Defining Device-Specific Properties6-41Determine the device the user wants to establish a connection with, specified bydevice ID.2Determine the form

Seite 21 - Running the Demo Adaptor

Creating Device Properties6-5Creating Device PropertiesTo define properties for a device, follow this procedure:1Create the property using the approp

Seite 22

6 Defining Device-Specific Properties6-6For example, use the createDoubleProperty() function to create a property whosevalue is of type double.hprop =

Seite 23

Creating Device Properties6-7 // Create a property of type double with a default value hProp = devicePropFact->createDoubleProperty("MyDouble

Seite 24

1 Getting Started1-2Custom AdaptorsThe Image Acquisition Toolbox Adaptor Kit is a C++ framework that you can use tocreate an adaptor. A C++ framework

Seite 25 - Using Environment Variables

6 Defining Device-Specific Properties6-8 Type = videosource Device Specific Properties: MyDoubleProp = 2.5MyBoundedIntProp = 100MyEnumeratedPro

Seite 26

Defining Hardware Trigger Configurations6-9Defining Hardware Trigger ConfigurationsTo define hardware trigger configurations, use the addConfiguratio

Seite 27 - Click OK

6 Defining Device-Specific Properties6-10Implementing Get and Set Support for Device-Specific PropertiesAfter connecting to a device through your adap

Seite 28 - Select DLL

Implementing Get and Set Support for Device-Specific Properties6-11In this example, the constructor accepts a handle to an IAdaptor object. Because t

Seite 29 - New Project

6 Defining Device-Specific Properties6-12IPropInfo functions you can retrieve the property name, its storage type and itsdefault value. This informati

Seite 30

Implementing Get and Set Support for Device-Specific Properties6-13ExampleThis example shows an implementation of a getValue() function for integer t

Seite 31 - Select VC++ Directories

6 Defining Device-Specific Properties6-14The following example iterates through all properties in the adaptor propertycontainer, associating a get lis

Seite 32

Implementing Get and Set Support for Device-Specific Properties6-15Defining a Set Listener ClassCreate a set listener class, deriving it from the abs

Seite 33 - Select General

6 Defining Device-Specific Properties6-16 // The new value for double properties. double _lastDoubleValue; // The new value for string propertie

Seite 34

Implementing Get and Set Support for Device-Specific Properties6-17Alternatively, you could define a separate set listener class for each property or

Seite 35 - Select Input

Custom Adaptors1-3MATLAB code files (MATLAB commands)Image Acquisition Toolbox engineAdaptor DLLVendor InterfaceHardwareRelationship of Adaptor to To

Seite 36 - Specify library names

6 Defining Device-Specific Properties6-18 getEngine()->getAdaptorPropContainer();2Add a set listener to a property in the c

Seite 37

Implementing Get and Set Support for Device-Specific Properties6-19 delete [] devicePropNames; }

Seite 39 - Set this property

7Storing Adaptor Information in anIMDF FileThis chapter describes how to store information about adaptor properties in an ImageDevice File (IMDF) in a

Seite 40 - Select Command Line

7 Storing Adaptor Information in an IMDF File7-2Using the IMDF Markup LanguageThis chapter describes how to use an XML-based markup language to specif

Seite 41

Using the IMDF Markup Language7-3Hierarchy of IMDF Elements

Seite 42

7 Storing Adaptor Information in an IMDF File7-4Creating an IMDF File: Toplevel ElementsThe ImageAcquisitionInfo element must be the root node of all

Seite 43 - Save the makefile

Specifying Help in an IMDF File7-5Specifying Help in an IMDF FileTo define help text for adaptor properties in an IMDF file, use the Help element. Yo

Seite 44

7 Storing Adaptor Information in an IMDF File7-6Element Description Attributes<Help> Defines the help section in anIMDF file. Must be child of t

Seite 45

Specifying Help in an IMDF File7-7The items in this list correspond to the numbered elements above.1Device-specific properties are properties of the

Seite 46

1 Getting Started1-4Creating an AdaptorTo create an adaptor, you must implement the C++ routines and the classes requiredby the adaptor framework. The

Seite 47

7 Storing Adaptor Information in an IMDF File7-84The first line of the help lists the name of the property with its constraints, such asrange and perm

Seite 48 - Creating a Stub Adaptor

Specifying Help in an IMDF File7-9Upon enabling the strobe output, it will start detectionof triggers and generate output as appropriate. Consult yo

Seite 49

7 Storing Adaptor Information in an IMDF File7-10Specifying Device InformationTo specify information about a particular device in an IMDF file, use th

Seite 50 - DeviceInfo fields are empty

Specifying Device Information7-11The following table summarizes the elements that can be children of a Device node, inthe order they must be specifie

Seite 51

7 Storing Adaptor Information in an IMDF File7-12<Device name="PCVision"> <Property optional="on" constrain

Seite 52

Specifying Property Information7-13Specifying Property InformationTo specify property information in an IMDF file, use the Property element. You cani

Seite 53

7 Storing Adaptor Information in an IMDF File7-14Specifying Property Element AttributesThe following table lists the attributes of a Property node in

Seite 54

Specifying Property Information7-15Constraint Value Descriptionbounded Property has both a minimum and maximum value. If you setthe constraint attrib

Seite 55 - Storing Device Information

7 Storing Adaptor Information in an IMDF File7-16Specifying Format InformationTo specify the video formats supported by a particular device in an IMDF

Seite 56 - Storing Format Information

Specifying Format Information7-17Element Description AttributesThis is an optional element. AVideoFormat node can containmultiple Include nodes.ident

Seite 57

Creating an Adaptor1-5Stage 3: Provide Hardware InformationIn this stage, you start development by creating a stub implementation of your adaptor.Eve

Seite 58

7 Storing Adaptor Information in an IMDF File7-18Specifying Hardware Trigger InformationTo specify hardware trigger information in an IMDF file, use t

Seite 59

Specifying Hardware Trigger Information7-19Element Description Attributescan contain zero or moreTriggerCondition nodes.Specifying Trigger SourcesWhe

Seite 60

7 Storing Adaptor Information in an IMDF File7-20Specifying Video SourcesTo specify the video source in an IMDF file, use the Source element. A Source

Seite 61 - Storing Adaptor Data

Defining and Including Sections7-21Defining and Including SectionsYou can gather one or more Property or TriggernInfo nodes into a group by usingthe

Seite 63 - Unloading Your Adaptor DLL

8Test Suite for Adaptor Writers• “Testing Adaptors or Hardware” on page 8-2• “Creating a Stub Adaptor Test Procedure” on page 8-3• “Specifying Format

Seite 64

8 Test Suite for Adaptor Writers8-2Testing Adaptors or HardwareAs part of the Image Acquisition Toolbox Adaptor Kit, we now offer a test procedure and

Seite 65

Creating a Stub Adaptor Test Procedure8-3Creating a Stub Adaptor Test ProcedureAs part of the Image Acquisition Toolbox Adaptor Kit, we now offer a t

Seite 66

8 Test Suite for Adaptor Writers8-4Test Procedures Expected ResultsdevInfo(:).DeviceInfo DefaultFormat: '640x480'DeviceFileSupported: 0Devic

Seite 67

Creating a Stub Adaptor Test Procedure8-5Test Procedures Expected ResultsvidObj = videoinput ('AdaptorName')format without any error and

Seite 68 - 4 Defining Your Adaptor Class

1 Getting Started1-6an alternative, you can define device-specific properties in an image device definitionfile (IMDF). For more information, see “Def

Seite 69

8 Test Suite for Adaptor Writers8-6Specifying Format of Image Data Test ProcedureAs part of the Image Acquisition Toolbox Adaptor Kit, we now offer a

Seite 70

Implementing the Acquisition Thread Function Test Procedure8-7Implementing the Acquisition Thread Function Test ProcedureAs part of the Image Acquisi

Seite 71

8 Test Suite for Adaptor Writers8-8Supporting ROIs Test ProcedureAs part of the Image Acquisition Toolbox Adaptor Kit, we now offer a test procedure a

Seite 72

Specifying Device Driver Identification Information Test Procedure8-9Specifying Device Driver Identification Information Test ProcedureAs part of the

Seite 73 - Identifying Video Sources

8 Test Suite for Adaptor Writers8-10Test Procedures Expected ResultsSourceName = input1Tag =Type = videosourceDevice-specific Properties:Brightness =

Seite 74

Using the Test Suite Functions and Properties8-11Using the Test Suite Functions and PropertiesIn this section...“Test Suite Properties” on page 8-11“

Seite 75

8 Test Suite for Adaptor Writers8-12Property Description• current test name• current test details/information• any applicable information on how toint

Seite 76

Using the Test Suite Functions and Properties8-13Function PurposerunAllAutomatedTestsFor automated testing, run all automated tests.This runs all tes

Seite 77

8 Test Suite for Adaptor Writers8-14Function PurposerunAutomatedRepeated AcquisitionTestFor automated testing, run automated repeatedacquisition tes

Seite 78

Using the Test Suite Functions and Properties8-15Function PurposerunAutomatedHardware TriggerTestFor automated testing, run automated triggertest f

Seite 79

Looking at the Demo Adaptor1-7Looking at the Demo AdaptorA good way to get a quick introduction to adaptors and adaptor development is by lookingat t

Seite 80

8 Test Suite for Adaptor Writers8-16Function PurposemethodsGet the list of tests that can be run.For an imaqkit.AdaptorTest object calledtestObj, use

Seite 81 - Acquiring Image Data

Using the Test Suite Functions and Properties8-17This example shows the basic workflow of creating and running a test using some of thefunctions outl

Seite 83 - Specifying Image Dimensions

1 Getting Started1-8Source File DescriptionDemoSourceListener.h Definition of class used to listen for changes in theselected video sourceDemoTimestam

Seite 84

Looking at the Demo Adaptor1-9DemoAdaptor.hAfter viewing the exported functions, take a look at the definition of the DemoAdaptorclass in DemoAdaptor

Seite 85 - Specifying Frame Type

How to Contact MathWorksLatest news:www.mathworks.comSales and services:www.mathworks.com/sales_and_servicesUser community:www.mathworks.com/matlabcen

Seite 86

1 Getting Started1-10MATLAB Command BreakpointcreateInstance()imaqhwinfo(obj) getDriverDescription()getDriverVersion()getMaxWidth()getMaxHeight()getFr

Seite 87

Looking at the Demo Adaptor1-11Note Because the toolbox caches adaptor information, you might need to reset thetoolbox, using imaqreset, before a new

Seite 88

1 Getting Started1-12Preview Windows Containing Demo Adaptor Data

Seite 89

2Setting Up Your Build EnvironmentThis chapter describes the libraries and include files you need to build an adaptor onWindows, Linux, or Macintosh s

Seite 90

2 Setting Up Your Build Environment2-2Setting up a Build Environment on Windows SystemsSetting up the build environment involves specifying the header

Seite 91

Setting up a Build Environment on Windows Systems2-3Header File andLibrariesLocationAdaptor kit headerfiles$(MATLAB)\toolbox\imaq\imaqadaptors\kit\in

Seite 92

2 Setting Up Your Build Environment2-4Creating an Adaptor Project Using Microsoft Visual C++As the first step toward building an adaptor, open Microso

Seite 93

Setting up a Build Environment on Windows Systems2-5Select Win32 Project.Select Win32.Specify name and locationof project.Click OK.• Click OK. Visual

Seite 94

2 Setting Up Your Build Environment2-6Select Empty Project. Click Finish.Select DLL.After you create the project, close the Start Page . Visual C++ di

Seite 95

Setting up a Build Environment on Windows Systems2-7New ProjectRecompiling with New Versions of the Image Acquisition Toolbox SoftwareAfter you have

Seite 96

Revision HistorySeptember 2005 PDF only New for Version 1.0 (Release 14SP3)March 2007 PDF only Revised for Version 1.0 (Release 2007a)September 2007 P

Seite 97

2 Setting Up Your Build Environment2-8where matlabroot represents your MATLAB installation folder.Specifying Header File LocationsBefore you can compi

Seite 98

Setting up a Build Environment on Windows Systems2-9Click OK.Select Include Directories and click Edit.Select VC++ Directories.4Add the locations of

Seite 99

2 Setting Up Your Build Environment2-10Specify header file locations.Click OK.5After specifying the header file folders, click OK.Specifying Libraries

Seite 100 - Acquiring Image Data

Setting up a Build Environment on Windows Systems2-113Expand Configuration Properties and then expand Linker. Select General and,on this page, select

Seite 101

2 Setting Up Your Build Environment2-12on page 2-3. You must replace <ARCH> with the name of an architecture-specificfolder, such as, win32 or w

Seite 102 - Supporting ROIs

Setting up a Build Environment on Windows Systems2-13Select Additional Dependencies and click Edit.Select Input.Click OK.4Specify the names of the ad

Seite 103

2 Setting Up Your Build Environment2-14Specify library names.Click OK.5Click OK.Configuring Other Project ParametersIn addition to specifying the head

Seite 104 - 5 Acquiring Image Data

Setting up a Build Environment on Windows Systems2-15dAdd the new source file to your project. From the File menu, select MoveSource1.cpp into and se

Seite 105 - Supporting Hardware Triggers

2 Setting Up Your Build Environment2-16Select Code Generation.Set these properties.Click OK.4In the Property Pages dialog box, under C/C++, select Lan

Seite 106

Setting up a Build Environment on Windows Systems2-17Select Language.Set this property.Click OK.5In the Property Pages dialog box, under C/C++, selec

Seite 108 - Using Critical Sections

2 Setting Up Your Build Environment2-18Click OK.Select Command Line.Specify command line argument.Click OK.

Seite 109 - Using Critical Sections

Setting up a Build Environment on Linux and Macintosh Systems2-19Setting up a Build Environment on Linux and Macintosh SystemsIn this section...“Requ

Seite 110

2 Setting Up Your Build Environment2-20Creating a Makefile Based on the Demo Adaptor MakefileTo create a makefile to build your adaptor based on the d

Seite 111 - User Scenario

Setting up a Build Environment on Linux and Macintosh Systems2-218Save the makefile.After you create your makefile, use it to build your adaptor, as

Seite 113

3Providing Hardware InformationThis chapter describes how an adaptor provides the toolbox engine with informationabout the image acquisition device (o

Seite 114

3 Providing Hardware Information3-2Using Adaptor Exported FunctionsThe Image Acquisition Toolbox engine requires that every adaptor export five functi

Seite 115 - Suggested Algorithm

Using Adaptor Exported Functions3-3initializeAdaptor()MATLAB Toolbox Engine AdaptorEngine searches for adaptorDLLs and loads them.imaqhwinfoReturns l

Seite 116

3 Providing Hardware Information3-4Creating a Stub AdaptorThe easiest way to start building an adaptor is to create a stub implementation, compileand

Seite 117 - Creating Device Properties

Creating a Stub Adaptor3-5 const char* formatName, imaqkit::IPropFactory* deviceProp

Seite 118 - Creating Property Help

vContentsGetting Started1Custom Adaptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2What Knowledge Is Required? . . .

Seite 119

3 Providing Hardware Information3-6Note: At this point in your adaptor development, the DeviceIDs field and theDeviceInfo fields are empty.imaqhwinfo(

Seite 120

Performing Adaptor and Device SDK Initialization3-7Performing Adaptor and Device SDK InitializationEvery adaptor must include an initializeAdaptor()

Seite 121

3 Providing Hardware Information3-8Specifying Device and Format InformationEvery adaptor must include a getAvailHW() function. In this function, you p

Seite 122

Specifying Device and Format Information3-9format supported by a device, you must create an IDeviceFormat object and then storethe object in the IDev

Seite 123

3 Providing Hardware Information3-10Your adaptor's getAvailHW() function must provide the engine with the followinginformation for each device:•

Seite 124

Specifying Device and Format Information3-11Suggested Algorithm for getAvailHW() FunctionStoring Device InformationYou store device information in an

Seite 125

3 Providing Hardware Information3-12You can specify any values for these arguments, but note that they are visible to toolboxusers in the structure re

Seite 126

Specifying Device and Format Information3-13Because the ID is not exposed to users, you can specify any convenient value. Forexample, if the device&a

Seite 127

3 Providing Hardware Information3-14Example: Providing Device and Format InformationThe following example presents a simple implementation of a getAva

Seite 128

Specifying Device and Format Information3-15dev = AdaptorDllName: 'C:\My_Adaptor\mydeviceimaq.dll' AdaptorDllVersion: '4.1 (

Seite 129

vi ContentsCreating a Makefile Based on the Demo Adaptor Makefile . 2-20Providing Hardware Information3Using Adaptor Exported Functions . . . . . . .

Seite 130

3 Providing Hardware Information3-16Field DescriptionDeviceID Numeric value that uniquely identifies a particular device. You definethis value when yo

Seite 131

Defining Classes to Hold Device-Specific Information3-17Defining Classes to Hold Device-Specific InformationYou might want to store more information

Seite 132

3 Providing Hardware Information3-18The demo adaptor provides an example, defining a class to hold additional formatinformation. This class, named Dem

Seite 133 - IMDF File

Unloading Your Adaptor DLL3-19Unloading Your Adaptor DLLEvery adaptor must include an uninitializeAdaptor() function. The engine callsthis function w

Seite 134

3 Providing Hardware Information3-20Returning Warnings and Errors to the MATLAB Command LineTo return error or warning messages from your adaptor to t

Seite 135 - Hierarchy of IMDF Elements

4Defining Your Adaptor ClassThis chapter describes how to define your adaptor class and instantiate an objectof this class. Every adaptor must define

Seite 136

4 Defining Your Adaptor Class4-2Defining Your Adaptor ClassThe next four topics describe how to define your adaptor class and instantiate an objectof

Seite 137

Using IAdaptor Abstract Class Virtual Functions4-3Using IAdaptor Abstract Class Virtual FunctionsThe following table lists the pure virtual functions

Seite 138

4 Defining Your Adaptor Class4-4Pure Virtual Function Description with DeclarationgetNumberOfBands() Returns the number of bands used in the returned

Seite 139

Creating Stub Implementation of Your Adaptor Class4-5Creating Stub Implementation of Your Adaptor ClassTo create a stub implementation of your adapto

Seite 140 - Creating AdaptorHelp Nodes

viiIdentifying Video Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9Suggested Algorithm . . . . . . . . . . . . . . . . . . . . .

Seite 141

4 Defining Your Adaptor Class4-63Add a C++ source file to the adaptor project. You can give the source file any name.This example names the file mydev

Seite 142 - Specifying Device Information

Creating Stub Implementation of Your Adaptor Class4-7Exported Functions” on page 3-2. This is needed because the createInstance()exported function in

Seite 143 - Example: Device Node

4 Defining Your Adaptor Class4-8Note While you can create a video input object with your adaptor, you cannotuse it to acquire video from a device. You

Seite 144

Identifying Video Sources4-9Identifying Video SourcesThe toolbox defines a video source as one or more hardware inputs that are treatedas a single en

Seite 145

4 Defining Your Adaptor Class4-10Because the ID is not exposed to users, you can specify any convenient value. Forexample, if the device's SDK us

Seite 146

Instantiating an Adaptor Object4-11Instantiating an Adaptor ObjectEvery adaptor must include a createInstance() function. The engine calls thisfuncti

Seite 147

4 Defining Your Adaptor Class4-12Implementing Your Adaptor Class ConstructorBecause you write the code that calls your adaptor class constructor, you

Seite 148 - Specifying Format Information

Instantiating an Adaptor Object4-13imaqkit::IAdaptor* createInstance(imaqkit::IEngine* engine, imaqkit::IDeviceInfo* device

Seite 149

4 Defining Your Adaptor Class4-14}

Seite 150

5Acquiring Image DataThis chapter describes how to implement the adaptor member functions to performimage acquisition. After completing the tasks outl

Seite 151 - Specifying Trigger Conditions

viii ContentsUsing Critical Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-30Understanding Critical Sections . . . . . . . . .

Seite 152 - Specifying Video Sources

5 Acquiring Image Data5-2Acquiring Image DataAfter completing chapters 3 and 4, you can see your adaptor included in the list ofadaptors returned by i

Seite 153

Acquiring Image Data5-3acquire data. With hardware triggers, you start the object and it waits until it receives asignal from an external device to s

Seite 154

5 Acquiring Image Data5-4open()openDevice()MATLAB Toolbox Engine AdaptorMake sure device is notalready logging.Start new threadof execution.Send messa

Seite 155

Specifying the Format of the Image Data5-5Specifying the Format of the Image DataBefore you can acquire data from your device, you must tell the engi

Seite 156 - Testing Adaptors or Hardware

5 Acquiring Image Data5-6The engine calls these functions in your adaptor to get the resolution information that itdisplays in the VideoResolution pro

Seite 157

Specifying the Format of the Image Data5-7names specified in the example in “Specifying Device and Format Information” on page3-8.int MyDeviceAdaptor

Seite 158

5 Acquiring Image Data5-8Format Frame TypesSigned 16- and 32-bit formats; both little-endian and big-endian;in regular and flip formats.Floating-point

Seite 159

Specifying the Format of the Image Data5-9describe how the bytes of red, green, and blue data are arranged in memory. In packedformats, the red, gree

Seite 160

5 Acquiring Image Data5-10Opening and Closing Connection with a DeviceAdaptors typically open a connection with the device in their openDevice() funct

Seite 161

Opening and Closing Connection with a Device5-11HANDLE CreateThread( LPSECURITY_ATTRIBUTES lpThreadAttributes, SIZE_T dwStackSize, LPTHREAD_START_

Seite 162 - defines y offset

ixSpecifying Help in an IMDF File . . . . . . . . . . . . . . . . . . . . . . . 7-5User Scenario: Viewing Property Help . . . . . . . . . . . . . . .

Seite 163

5 Acquiring Image Data5-12 return true; // Create the image acquistion thread. _acquireThread = CreateThread(NULL,

Seite 164

Opening and Closing Connection with a Device5-13private:// Declaration of acquisition thread functionstatic DWORD WINAPI acquireThread(void* param);/

Seite 165 - Test Suite Properties

5 Acquiring Image Data5-14 WaitForSingleObject(_acquireThread, 10000); // Close thread handle. CloseHandle(_acquireThread);

Seite 166 - Test Suite Functions

Starting and Stopping Image Acquisition5-15Starting and Stopping Image AcquisitionOnce openDevice() returns successfully, the engine calls your adapt

Seite 167

5 Acquiring Image Data5-16The PostThreadMessage() function accepts these parameters:BOOL PostThreadMessage( DWORD idThread, UIN

Seite 168

Starting and Stopping Image Acquisition5-17Suggested Algorithm for stopCapture()The stopcapture() function typically performs these tasks.1Checks whe

Seite 169 - deviceId2, deviceFormat2)

5 Acquiring Image Data5-18Implementing the Acquisition Thread FunctionThis section describes how to implement your adaptor's acquisition thread f

Seite 170 - Test Suite Example

Implementing the Acquisition Thread Function5-19When it receives the appropriate message, the acquisition thread function entersthe frame acquisition

Seite 171

5 Acquiring Image Data5-20Frame Acquisition LoopThe frame acquisition loop is where your adaptor acquires frames from the device andsends them to the

Seite 172

Implementing the Acquisition Thread Function5-21dSend the packaged frame to the engine, using the IEngine member functionreceiveFrame().5Increment th

Kommentare zu diesen Handbüchern

Keine Kommentare