MATLAB IMAGE ACQUISITION TOOLBOX - RELEASE NOTES Guida Utente

Navigare online o scaricare Guida Utente per Software MATLAB IMAGE ACQUISITION TOOLBOX - RELEASE NOTES. MATLAB IMAGE ACQUISITION TOOLBOX - RELEASE NOTES User`s guide Manuale Utente

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 172
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti

Sommario

Pagina 1 - User's Guide

Image Acquisition Toolbox™ Adaptor KitUser's GuideR2015a

Pagina 2 - How to Contact MathWorks

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

Pagina 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

Pagina 4

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

Pagina 5 - Contents

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

Pagina 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

Pagina 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

Pagina 8

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

Pagina 9

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

Pagina 10

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

Pagina 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

Pagina 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

Pagina 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•

Pagina 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

Pagina 15 - Creating an Adaptor

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

Pagina 16 - 1 Getting Started

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

Pagina 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

Pagina 18

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

Pagina 19 - Setting Breakpoints

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

Pagina 20

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

Pagina 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

Pagina 22

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

Pagina 23

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

Pagina 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

Pagina 25 - Using Environment Variables

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

Pagina 26

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

Pagina 27 - Click OK

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

Pagina 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

Pagina 29 - New Project

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

Pagina 30

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

Pagina 31 - Select VC++ Directories

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

Pagina 32

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

Pagina 33 - Select General

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

Pagina 34

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

Pagina 35 - Select Input

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

Pagina 36 - Specify library names

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

Pagina 37

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

Pagina 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

Pagina 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

Pagina 41

Using the IMDF Markup Language7-3Hierarchy of IMDF Elements

Pagina 42

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

Pagina 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

Pagina 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

Pagina 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

Pagina 46

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

Pagina 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

Pagina 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

Pagina 49

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

Pagina 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

Pagina 51

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

Pagina 52

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

Pagina 53

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

Pagina 54

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

Pagina 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

Pagina 56 - Storing Format Information

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

Pagina 57

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

Pagina 58

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

Pagina 59

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 66

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

Pagina 67

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

Pagina 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

Pagina 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

Pagina 70

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

Pagina 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

Pagina 72

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

Pagina 73 - Identifying Video Sources

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

Pagina 74

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

Pagina 75

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

Pagina 76

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

Pagina 77

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

Pagina 78

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

Pagina 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

Pagina 80

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

Pagina 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

Pagina 83 - Specifying Image Dimensions

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

Pagina 84

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

Pagina 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

Pagina 86

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

Pagina 87

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

Pagina 88

1 Getting Started1-12Preview Windows Containing Demo Adaptor Data

Pagina 89

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

Pagina 90

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

Pagina 91

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

Pagina 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

Pagina 93

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

Pagina 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

Pagina 95

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

Pagina 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

Pagina 97

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

Pagina 98

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

Pagina 99

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

Pagina 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

Pagina 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

Pagina 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

Pagina 103

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

Pagina 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

Pagina 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

Pagina 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

Pagina 108 - Using Critical Sections

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

Pagina 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

Pagina 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

Pagina 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

Pagina 113

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

Pagina 114

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

Pagina 115 - Suggested Algorithm

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

Pagina 116

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

Pagina 117 - Creating Device Properties

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

Pagina 118 - Creating Property Help

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

Pagina 119

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

Pagina 120

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

Pagina 121

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

Pagina 122

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

Pagina 123

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

Pagina 124

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

Pagina 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

Pagina 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

Pagina 127

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

Pagina 128

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

Pagina 129

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

Pagina 130

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

Pagina 131

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

Pagina 132

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

Pagina 133 - IMDF File

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

Pagina 134

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

Pagina 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

Pagina 136

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

Pagina 137

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

Pagina 138

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

Pagina 139

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

Pagina 140 - Creating AdaptorHelp Nodes

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

Pagina 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

Pagina 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

Pagina 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

Pagina 144

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

Pagina 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

Pagina 146

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

Pagina 147

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

Pagina 148 - Specifying Format Information

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

Pagina 149

4 Defining Your Adaptor Class4-14}

Pagina 150

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

Pagina 151 - Specifying Trigger Conditions

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

Pagina 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

Pagina 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

Pagina 154

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

Pagina 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

Pagina 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

Pagina 157

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

Pagina 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

Pagina 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

Pagina 160

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

Pagina 161

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

Pagina 162 - defines y offset

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

Pagina 163

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

Pagina 164

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

Pagina 165 - Test Suite Properties

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

Pagina 166 - Test Suite Functions

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

Pagina 167

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

Pagina 168

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

Pagina 169 - deviceId2, deviceFormat2)

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

Pagina 170 - Test Suite Example

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

Pagina 171

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

Pagina 172

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

Commenti su questo manuale

Nessun commento