MATLAB IMAGE ACQUISITION TOOLBOX 3 Betriebsanweisung

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

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

Inhaltsverzeichnis

Seite 1 - User’s Guide

Image AcquisitionToolbox 3User’s Guide

Seite 2 - Natick, MA 01760-2098

Retrieving Event Informa tion ... 7-7Introduction... 7-7Event Structures...

Seite 3 - Revision History

4 Connecting to HardwareBy default, the video input object makes the first video source object in thearray the selected source. To use another video s

Seite 4

Configuring Image Acquisitio n Object PropertiesConfiguring Image Acquis ition Object PropertiesIn this section.. .“About Image Acquisition Object Pro

Seite 5 - Contents

4 Connecting to HardwareNote Three video input object trigger properties require the use of a specialconfiguration function. For more information, see

Seite 6

Configuring Image Acquisitio n Object PropertiesType = videoinputUserData = []VideoFormat = M_RS170VideoResolution = [64 0 48 0]Callback Functio n Set

Seite 7 - ConnectingtoHardware

4 Connecting to HardwareNote The video source object for your device might not include device-specificproperties. For example, devices a ccess ed with

Seite 8

Configuring Image Acquisitio n Object Propertiesvid.Previewingans =offGetting Information About Object PropertiesTo get information about a p articula

Seite 9 - WorkingwithAcquiredImageData

4 Connecting to HardwareNote Because some properties are read only, on ly a subset of all video inputand video source properties can be set.This examp

Seite 10

Configuring Image Acquisitio n Object PropertiesSetting Trigger PropertiesThe values of certain trigger properties, TriggerType, Trigg erCondition,and

Seite 11 - Troubleshooting

4 Connecting to HardwareStar ting and Stopping a Video Input ObjectWhen you create a video input object, y ou establish a connection betweenMATLAB and

Seite 12 - Functions — By Category

Startin g and Stopping a Video Input ObjectThe following figure illustrates how an object moves from a running to astopped state.Tra nsitions from Run

Seite 13

Adding Support for Additional Hardware9Overview ... 9-2For More Information... 9-3Tro

Seite 14 - ... A-3

4 Connecting to HardwareConfigure an acquisition that takes several seconds so that you can see thevideo input in logging state.vid.FramesPerTrigger =

Seite 15 - Getting Started

Startin g and Stopping a Video Input ObjectAfter it acquires the specified number of frames, the video input objectstops running.isrunning(vid)ans =07

Seite 16 - 1 Getting Started

4 Connecting to HardwareDeleting Image Acquisition ObjectsWhen you finis h usi ng you r image acquisition obj ects, use the delete functionto remove t

Seite 17 - Supported Hardware

Deleting Image Acquisition ObjectsYou can also delete all the video input objects that currently exist i nmemory in one call todelete by using the ima

Seite 18

4 Connecting to HardwareSaving Image Acquisition ObjectsIn this section.. .“UsingthesaveCommand”onpage4-30“Using the obj2mfile Command” on page 4 -30U

Seite 19

5Acquiring Image DataThe core of any image acquisitio n ap p lication i s th e d ata acquired from theinput device. A trigger is th e event that initi

Seite 20

5 Acqu iring Image DataManaging Memory Usage (p. 5-35)Describes how to use theimaqmemfunction to monitor toolbox memoryusageLogging Image Data to Disk

Seite 21

Data LoggingData LoggingIn this section.. .“Overview” on page 5-3“Trigger Properties” on page 5 -4OverviewWhen a trigg er occurs, the toolbox sets the

Seite 22

5 Acqu iring Image DataThe fol lowing figure il lustrates a group of frame s being acquired from thevideo stream and being logg ed to m emory a nd dis

Seite 23

Data LoggingProperty DescriptionTriggerConditionSpecifies the condition that m ust be met fora trig ge r to be executed. This property isalways set to

Seite 24

Troubleshooting Q Im aging Hardware ... 10-19Troubleshooting QImaging Devices... 10-19Determining the Driver Version for Q

Seite 25

5 Acqu iring Image DataSetting the Values of Trigger PropertiesIn this section.. .“About Trigger Properties” on page 5-6“Specifying Trigger Type, S ou

Seite 26

Setting the Va lues of Trigger Proper tiesDetermining Valid ConfigurationsTo find all the valid configurations of the TriggerType, TriggerSource,andTr

Seite 27 - V iewing Object Properties

5 Acqu iring Image DataIf you are specifying a manual trig ger, you only need to specify the trig gertype value as an argument.triggerconfig(vid,&apos

Seite 28

Specifying the Trigger TypeSpecifying the Trigger TypeIn this section.. .“Comparison o f Trigger Types” on page 5-9“Example: Using an Immediate Trigge

Seite 29 - Setting Object Properties

5 Acqu iring Image DataComparison of Trigger Types (Continued)TriggerTypeValueTriggerSourceandTriggerConditionValues Description'manual'Alwa

Seite 30

Specifying the Trigger TypeExample: Using an Immediate TriggerTo use an immediate trigger, simply create a video input o bj ect. Imm ed iatetriggering

Seite 31 - Running the Example

5 Acqu iring Image DataVe rify that the o bject has not acquired any frames.get(vid,'FramesAcquired')ans =02 Configure properties — To use a

Seite 32

Specifying the Trigger TypeTo execute anothe r immediate trigger, you must restart the object. Note,however, that this deletes the data acquired by th

Seite 33

5 Acqu iring Image Datayour image acquisition device and substitute that syntax for the followingcode.vid = videoinput('win video',1);Ve rif

Seite 34

Specifying the Trigger Type0Verify that the object has still not acquired any frames.get(vid,'FramesAcquired')ans =04 Execute the manual tri

Seite 35

Functions — Alphabetical List12Properties — By Category13Video Input Objects ... 13-2General...

Seite 36

5 Acqu iring Image DataExample: Using aHardware TriggerTo use a hardwaretrigger,createavideoinputobjectandsetthevalueoftheTriggerType property to&apos

Seite 37 - Toolbox Compone

Specifying the Trigger Typeyour image acquisition device and substitute that syntax for the followingcode. The device mu st support hardware triggers.

Seite 38 - 2 Introduction

5 Acqu iring Image Data4 Start the image acquisition object —Callthestart function to startthe image acquisition object.start(vid)The object is runnin

Seite 39 - Setting Up Frame Grabbers

Specifying the Trigger Typeexecute multiple triggers, specify a value for the TriggerRep eat property.See “Specifying Multiple Triggers” on p age 5-29

Seite 40

5 Acqu iring Image DataControlling Logging ParametersIn this section.. .“Data Logging” on p age 5-20“Specifying Logging Mode” on page 5-20“Specifying

Seite 41

Controlling Logging Parametersmemory buffer. For more information, see “Bringing Image Data into theMATLAB Workspace” on page 6-3.Yo u can also log da

Seite 42 - Previewing Data

5 Acqu iring Image DataSpecifying the Amount of Data to LogNote W h ile you can specify any size acquisition, the number of framesyou can acquire is l

Seite 43

Controlling Logging ParametersThe following figu re illu stra tes how the F rame GrabInterval property affectsan acquisition.Impact of FrameGrabInterv

Seite 44

5 Acqu iring Image Data2 Configure properties — Specify the amount of data you want to acquireas the number of frames per trigger. By default, a video

Seite 45

Controlling Logging ParametersDetermining HowMany Frames Are AvailableThe FramesAcqu iredproperty tells how many frames the object has loggedsince it

Seite 46

Acquiring Image Data ... A-3Working with Acquired Data... A-3Events and Callbacks...

Seite 47

5 Acqu iring Image DataThe object executes an immediate trigger and begins acquiring frames ofdata. Thestart function returns control to the command l

Seite 48

Controlling Logging Parameters5 Remove frames from the memory buffer —Whenyouremoveframes from the memory buffer, the o bject d ecrements the value of

Seite 49

5 Acqu iring Image DataContents of Memor y Buffer Before and After Removing Frames6 Clean up — Always rem ove image acquisition objects from mem ory,

Seite 50

Controlling Logging ParametersSpecifying a Delay Before Data Logging Begi n sSpecifying Multiple TriggersWhen a trigger occurs, a video input object a

Seite 51 - Each time

5 Acqu iring Image DataExecuting Multiple Triggers5-30

Seite 52

Waiting for an Acquisitio n to FinishWaiting for an Acquisition to FinishIn this section.. .“Using the wait Function” on page 5-31“Example: Blocking t

Seite 53 - Tool GUI

5 Acqu iring Image DataUsingwaittoBlocktheMATLABCommandLineExample: Blocking the Command Line Until anAcquisition CompletesThe following example illus

Seite 54 - Parts of the Desktop

Waiting for an Acquisitio n to Finish1 Create an im age acquisition object — Th i s example creates a videoinput o bj ect for a M atrox ima ge acquisi

Seite 55

5 Acqu iring Image Data4 Start the image acquisition object —Callthestart function to startthe image acquisition object.start(vid)The start function s

Seite 56

Managing Memory UsageManaging Memory UsageIn this section.. .“Memory Usage” on page 5-35“Monitoring Memo ry Usage” on page 5-35“Modifying the Frame Me

Seite 57 - Selecting Your Device

1Getting StartedThe best way to learn about the capabilities of Image Acquisition Toolboxis to look at a simple example. This chapter introduces the t

Seite 58 - Adding New Hardware

5 Acqu iring Image Dataout = imaqmem;mem_left = out.FrameMe moryLimit - out.FrameMe moryUsed;To see a n example of using a callback function to monito

Seite 59 - Using a Camera File

Managing Memory UsageFreeing MemoryAt times, while acquiring image data, you m ight want to delete some or allof the frames that are stored in memory.

Seite 60

5 Acqu iring Image DataTo verify that the object acquired data, view the value of theFramesAvailable property. This property reports how m any frames

Seite 61 - Setting Frames Per Trigger

Managing Memory Usage5 Empty the entire memory buffer —Callingflushdata withoutspecifying the m ode deletes all the frames s tored in memory.flushdata

Seite 62 - Using the Region of Interest

5 Acqu iring Image DataLogging Image Data to DiskIn this section.. .“Logging Data to Disk” on page 5-40“Creating an AV I File Object for Logging” on p

Seite 63

Logging Image Data to DiskLogging Data to a Disk FileCreating an AVI File Object for LoggingTocreateanAVIfileintheMATLABenvironment,usetheavifile func

Seite 64

5 Acqu iring Image DataLogging Grayscale ImagesWhen logging images in grayscale format, such a s RS170, you must set thevalue of the AVI object’sColor

Seite 65 - Logging Your Data

Logging Image Data to DiskNote When you log frames to disk, the video input object queues the framesfor writing but the operating system might not per

Seite 66 - Disk Logging

5 Acqu iring Image Datato a midlevel value. By low ering the qual ity, the AVI file object createssmaller log file s.aviobj.Quality = 50;Because this

Seite 67 - Setting Up Triggering

Logging Image Data to Diskvid.DiskLoggerFrameCountans =40Note Becauseittakeslongertowriteframestoadiskfilethantomemory,the value of theDiskLoggerFrame

Seite 68 - Selecting the Trigger Type

1 Getting StartedWhat Is Image Acquisition Toolbox?In this section.. .“Overview” on page 1-2“Installation and Configuration Notes” o n page 1-3“Relate

Seite 69

5 Acqu iring Image Data5-46

Seite 70

6Working with AcquiredImage DataWhen you trigger an acquisition, the toolbox stores the image data in amemory buffer, a disk file, or both. To work wi

Seite 71 - The Preview Window

6 Working with Acquired Image DataOver viewWhen a trigger occurs, the toolbox acquires frames from the video stream andlogs the frames to a buffer in

Seite 72

Bringing Image Data into the MATL AB WorkspaceBringing Image Data into the MATLAB WorkspaceIn this section.. .“Overview” on page 6-3“Moving M ultiple

Seite 73 - Acquiring Data

6 Working with Acquired Image Datathe value of the FramesAvailable property. For more information, see“Bringing a Single Frame into the Workspace” on

Seite 74 - 4 and Number of

Bringing Image Data into the MATL AB Workspacegetdata Blocks Until Frames Become AvailableExample: Acquiring 1 0 Seconds of Image DataThis example sho

Seite 75 - 1 or any

6 Working with Acquired Image Dataset(vid,'FramesPerTrigger',300)3 Start the image acquisition object —Callthestart function to startthe ima

Seite 76 - If Images Are Blurry or Dark

Bringing Image Data into the MATL AB Workspacethe frames returned by peekdata at each call. (peekdata returns frameswithout removing them from the mem

Seite 77 - Previewing and Acquiring Data

6 Working with Acquired Image Datatriggerconfig(vid,'manual')In addition, configure a large enough acquisition to allow several calls topeek

Seite 78 - Expor ting Data

Bringing Image Data into the MATL AB WorkspaceName Size Bytes Classpdata 96x128x3 36864 uint8 arrayvid 1x1 1060 videoinput obje ctVe rify that the o b

Seite 79 - Exporting Data

What Is Image Acquisition Toolbox?Installation and Configuration NotesTo determine if Image Acquisition Toolbox is installed on your system, typethis

Seite 80 - 3 Click Save

6 Working with Acquired Image Data7 Clean up — Always rem ove image acquisition objects from mem ory, andthe variables that re ference them, when you

Seite 81

Bringing Image Data into the MATL AB WorkspaceNote that the frame returned by getsnapshot is not rem ov ed from thememory buffer, if frames are stored

Seite 82

6 Working with Acquired Image DataWorking with Image Data in the MATLAB WorkspaceIn this section.. .“Understanding Image Data” on page 6-12“Determinin

Seite 83 - 4 Click Save

Working with Image Data in the MATLAB Workspace• Determines the color space of the dataThis section also describes several ways to view acquired image

Seite 84

6 Working with Acquired Image Dataimage data being provided by the device; the ROIPosition property specifiesthe dimensions of the image frames being

Seite 85 - Connecting to Hardware

Working with Image Data in the MATLAB Workspace3 View the video format and video resolution properties — The toolboxcreates the object with t h e defa

Seite 86

6 Working with Acquired Image Data6 Bring multiple fram es into the w orksp ace —Callthegetdatafunction to bring multiple image frames into the MATLAB

Seite 87 - Getting Hardware Information

Working with Image Data in the MATLAB Workspacevid = videoinput('mat rox',1);2 Bring a single frame into the work space —Callthegetsna psho

Seite 88

6 Working with Acquired Image DataMathWorks product, Image Processing Toolbox, includes functions thatconvert Y CbCr data to RGB data, and v ice versa

Seite 89 - Getting Hardware Inform ation

Working with Image Data in the MATLAB Workspace4 Clean up — Always rem ove image acquisition objects from mem ory, andthe variables that re ference th

Seite 90

1 Getting StartedThe Image Acquisition Tool (GUI)In Version 2.0 of the toolbox, the functional ity of Image Acquisition Toolbox isavailable in a deskt

Seite 91

6 Working with Acquired Image DataRetrieving Timing InformationIn this section.. .“Introduction” on page 6-20“Determining When a Trigger Executed” on

Seite 92

Retrieving Timing InformationInitialTriggerTime Records First Trigge r ExecutionThe trigger timing information is stored in MATLAB clock vector format

Seite 93 - TypesofObjects

6 Working with Acquired Image DataTo see an example, see “Example: Determining the Frame Delay D uration”on page 6-22.Getting the Absolute Acquisition

Seite 94

Retrieving Timing Informationimaqhwinfo function to get the object constructor for your image acquisitiondevice and substitute that syntax for the fol

Seite 95 - 1 Thetitleofthesum

6 Working with Acquired Image Data6.05446.21436.34245 Clean up — A lways rem ove image acquisition objects from mem ory, andthe variables that re fere

Seite 96

7Using Events and CallbacksYou can enhance the power and flexibility of your image acquisitionapplication by using event callbacks. An event is a spec

Seite 97 - Using a Video Format String

7 Using Events and CallbacksExample: Using the Default Callback FunctionTo illustrate how to use callbacks, this section presents a s imple example th

Seite 98

Example: Using the Default Callback FunctionTrigger event occurred at 14:38:46 for video inpu t object: M_RS170-matrox-1.Stop event occurred at 14:38:

Seite 99

7 Using Events and CallbacksEvent TypesImage Acquisition Toolbox supports several different types of events. Eachevent type has an associated video in

Seite 100 - 4 Connecting to Hardware

Event TypesEvents and Callback Function Properties (Continued)Event Callback Proper ty D es criptionStartStartFcnThe toolbox generates a start event w

Seite 101

Basic Image Acquisition ProcedureBasic Image Acquisition ProcedureIn this section.. .“Overview” on page 1-5“Step 1: Install Your Image A cquisition De

Seite 102

7 Using Events and CallbacksEvents and Callback Function Properties (Continued)Event Callback Proper ty D es criptionTimerTimerFcnThe toolbox generate

Seite 103

Retrieving Event InformationRetrieving Event InformationIn this section.. .“Introduction” on page 7-7“Event Structures” on page 7-7“Example: Accessing

Seite 104

7 Using Events and Callbacksoccurred. For information about the information associated with specificevents, see the following sections:• “Data Fields

Seite 105

Retrieving Event InformationField Name DescriptionAbsTimeAbsolute time the event occurred, returned inMATLABclock format[year month day hour minut e s

Seite 106

7 Using Events and CallbacksThe toolbox adds event structures to the EventLog arrayintheorderinwhichthe events occur. The first event structure reflec

Seite 107 - Setting Trigger Properties

Retrieving Event InformationTo list the events that are recorded in the EventLog property, examine thecontents of theType field.{events.Type}ans =&apo

Seite 108

7 Using Events and CallbacksCreating and Executing Callback FunctionsIn this section.. .“Introduction” on page 7-12“Creating C allback Functions” on p

Seite 109

Creating and Executing Callback FunctionsM-file callback functions require at least two input arguments:• The image acquisition object• The event stru

Seite 110

7 Using Events and Callbacksfunction display_f rame (obj,event)sample_frame = peekdat a(obj,1);imagesc(sample_frame);drawnow; % force an update of the

Seite 111

Creating and Executing Callback FunctionsUsing a Text String to Specify Callback FunctionsYou can specify the callback function as a string. For examp

Seite 112

How to Contact The MathWorkswww.mathworks.comWebcomp.soft-sys.matlab Newsgroupwww.mathworks.com/contact_TS.html Technical [email protected]

Seite 113

1 Getting StartedTo use Image Acquisition Toolbox to acquire imag e data, you mu st performthe following basic steps:Step DescriptionStep 1: Install a

Seite 114

7 Using Events and CallbacksIf you a re executing a local callback function from within an M-file, you mustspecify the callback as a function handle.S

Seite 115 - Acquiring Image Data

Creating and Executing Callback Functionsvid = videoinput('mat rox', 1);2 Configure property values — This example sets the Frame sPerTrigge

Seite 116 - 5 Acqu iring Image Data

7 Using Events and Callbacksfunction mem_mon(o bj,e vent)out = imaqmem;mem_left = out.FrameMe moryLimit - out.FrameMe moryUsed;msg = 'Memory left

Seite 117 - Data Logging

Creating and Executing Callback Functions3 Acquire data — Start the video input object. E very 5 seconds, the objectexecutes the callback function ass

Seite 118

7 Using Events and Callbacks7-20

Seite 119

8Using the From VideoDeviceBlockinSimulinkImage Acquisition To olbox includes a block that can be used in Simulinkto bring live video data into models

Seite 120

8 Using the From Video Device Block in S imulinkOver viewThis chapter describes how to use the Image A cquisition Toolbox block library.The toolbox bl

Seite 121

Opening the B l ock LibraryOpening the Block Librar yIn this section.. .“Using the imaqlib Command” on page 8-3“Using the Simulink Library Browser” on

Seite 122

8 Using the From Video Device Block in S imulinkTo start the Sim ulin k Library Brow ser, entersimulinkat the MATLAB prompt. MATLAB opens the browser

Seite 123 - Specifying the Trigger Type

Example: Saving Video Data to a FileExample: Saving Video Data to a FileIn this section.. .“Introduction” on page 8-5“Step 1: Open the Image Acquisiti

Seite 124

Basic Image Acquisition ProcedureStep 2: Retrieve Hardware InformationIn this step, you get seve ral pieces of information that the toolbox needs toun

Seite 125 - Example: Using a

8 Using the From Video Device Block in S imulinkStep 2: Open a Model or Create a New ModelTo use a block, you must add it to an existing model or crea

Seite 126

Example: Saving Video Data to a FileStep 3: Drag the From Video Device Block into theModelTo use the From Video Device block in a model, click the blo

Seite 127 - Manual T

8 Using the From Video Device Block in S imulinkStep 4: Drag Other Blocks to Complete the ModelTo illustrate using the block, this example creates a s

Seite 128

Example: Saving Video Data to a FileDrag Output Block to Model Window8-9

Seite 129

8 Using the From Video Device Block in S imulinkStep 5: Connect the BlocksConnect the three outputs from the From Video Device block to the threecorre

Seite 130

Example: Saving Video Data to a Filebox for the From Video Device block, shown in t he following figure. Use thevarious fie lds in the dialog box to d

Seite 131

8 Using the From Video Device Block in S imulinkStep 7: Run the SimulationTo run the simulation, click the Start simulation buttononthemodelwindow too

Seite 132

9Adding Support forAdditional HardwareImage Acquisition Toolbox supports connections with hardware from manycommonvendorsbutitmightnotsupportthehardwa

Seite 133 - TriggerRep eat property

9 Adding Suppor t for Additional HardwareOver viewThe Image Acquisition Toolbox Adaptor Kit i s a C++ fram ework t hat you canuse to implement an adap

Seite 134

For More InformationFor More InformationTo build an adaptor requires familiarity with C++, knowledge of theapplicatio n programm ing interface (API) p

Seite 135

1 Getting StartedDetermining the Adaptor NameTo determine the name of the adaptor, enter the imaqhwinfo function at theMATLAB prompt without any argum

Seite 136

9 Adding Suppor t for Additional Hardware9-4

Seite 137 - Acquiring 100 Frames

10TroubleshootingThis chapter provides information about solving common problems you mightencounter with Image Acquisition Toolbox and the video acqui

Seite 138

10 TroubleshootingTroubleshooting HamamatsuHardware (p. 10-16)Provides some helpful tips ondiagnosing problems you mightencounter using the toolbox wi

Seite 139 - Many Frames Are Available

OverviewOver viewIf, after installing Image Acquisition Toolbox and using it to establish aconnection to your image acquisition device, you areunablet

Seite 140

10 TroubleshootingTroubleshooting DALSA Coreco IFC HardwareIn this section.. .“Troubleshooting DALSA Coreco IFC Devices” on page 10-4“Determining the

Seite 141

Troubleshooting DALSA Coreco IFC Ha rd w areIf you discover that y ou are using an unsupported driver version, visit theDALSA C oreco Web site (www.im

Seite 142

10 TroubleshootingTroubleshooting DALSA Coreco Sapera HardwareIn this section.. .“Troubleshooting DALSA Coreco Sapera Devices” on page 10-6“Determinin

Seite 143 - Specifying Multiple Triggers

Troubleshooting DALSA Coreco Sapera Hardware• Ve rify that the version is compatible with Image Acquisition Toolbox.For the correct driver information

Seite 144

10 TroubleshootingTroubleshooting Data Translation HardwareIf you are having trouble using Image Acquisition Toolbox with a supportedData Translation

Seite 145 - Using the wait Function

Troubleshooting DCAM IEEE 1 394 (FireWire) Ha rd w areTroubleshooting DCA M IEEE 1394 (FireWire) H ardwareIn this section.. .“Troubleshooting DCAM IEE

Seite 146

Basic Image Acquisition ProcedureDeviceInfo: [1x1 stru ct]Determining the Supported Video FormatsTodeterminewhichvideoformatsanimage acquisition devic

Seite 147

10 Troubleshooting3 Verify that your IEEE 1394 (FireWire) camera is using the Carnegie MellonUniversity (CMU) DCAM driver version 6.4.4.Note The toolb

Seite 148

Troubleshooting DCAM IEEE 1 394 (FireWire) Ha rd w areNote The CM U DCAM driver is the only DCAM driver supported by thetoolbox. You cannot use vendor

Seite 149 - Managing Memory Usage

10 Troubleshooting3 From the Camera Demo application, select Camera > Check L ink.Thisoption causes the demo application to loo k for DCAM-compatib

Seite 150

Troubleshooting DCAM IEEE 1 394 (FireWire) Ha rd w areNote If you are using 1394b, select Camera > 1394b Support,and then checkthe Maximum Speed op

Seite 151 - Freeing Memory

10 Troubleshooting10-14

Seite 152

Troubleshooting DCAM IEEE 1 394 (FireWire) Ha rd w areThe demo application starts displaying live video in the window.7 To exit,select Stop Camera fro

Seite 153

10 TroubleshootingTroubleshooting Hamamatsu HardwareIf you are having trouble using Image Acquisition Toolbox with a Hamamatsudigital camera, follow t

Seite 154 - Logging Image Data to Disk

Troubleshooting Matrox HardwareTroubleshooting Matrox H ardwareIn this section.. .“Troubleshooting Matrox Devices” on page 10-17“Determining the D riv

Seite 155 - Logging Data to a Disk File

10 TroubleshootingDetermining the Driver Version for Matrox DevicesTo determine the Matrox Imaging Library version you are using, run theMatrox MIL Co

Seite 156

Troubleshooting QImaging HardwareTroubleshooting Q Imaging H ardwareIn this section.. .“Troubleshooting QImaging Devices” on page 10-19“Determining th

Seite 157 - Example: Logging Data to Disk

1 Getting StartedObjectConstructor field. For mo re information the device informationstructure, see “Determining the Supported Video Formats” on page

Seite 158

10 TroubleshootingIf you discover that y ou are using an unsupported driver version, visit theQImaging Web site (www.qimaging.com) to dow nload the co

Seite 159

Troubleshooting National Instr uments HardwareTroubleshooting N ational Instruments HardwareIn this section.. .“Troubleshooting National Instruments D

Seite 160

10 TroubleshootingNote Image Acquisition Toolbox is compatible only with specific driverversions provided with the National Instruments software and i

Seite 161 - Image Data

Troubleshooting Windows Video HardwareTroubleshooting Windows Video HardwareIn this section.. .“Troubleshooting Windows Video Devices” on page 10-23“D

Seite 162 - Over view

10 TroubleshootingIf you discover that y ou are using an unsupported driver version, visit thehardware manufacturer’s Web site for the correct drivers

Seite 163 - Overview

Troubleshooting Windows Video HardwareIn the DirectX Diagnostic Tool, the Microsoft DirectX version is listed on theSystem tab under the System Inform

Seite 164

10 TroubleshootingTroubleshooting a Video Preview WindowWhen pre view ing the video stream , if you enco unter a problem, try one ofthe following solu

Seite 165 - FramesPerTrigger property to

Contacting The Math Works and Using the imaq s upport FunctionContacting The MathWorks and Using the imaqsupportFunctionIf you need support from The M

Seite 166

10 Troubleshooting10-28

Seite 167 - Frames Returned by peekdata

11Functions — By CategoryObjects General Purpose ( p. 11-2)Functions re lated to objectsTriggering (p. 11-3)Functions related to triggeringData (p. 11

Seite 168

Basic Image Acquisition Procedure'Y8_1024x768' video data to be logged upon START.Grabbing first of every 1 frame(s).Log data to 'memor

Seite 169

11 Functions — By C atego ryObjects G eneral PurposeVideo i nput objects have one or more video source objects associated withthem. In this table, fun

Seite 170

TriggeringstopStop video input objectvideoinputCreate video input objectwaitWait until image acquisition objectstops running or loggingTriggeringtrigg

Seite 171 - FramesAvailable property

11 Functions — By C atego ryToolsclosepreviewClose Video Preview windowimaqhelpImage acquisition object functio nand property helpimaqhwinfoInformatio

Seite 172 - Understanding Image Data

Getting Command-Line Function HelpGetting Command-Line Function HelpTo get command-line function help, you can use the MATLAB help function.For exampl

Seite 173 - ROIs and Image Dimensions

11 Functions — By C atego ryYo u can also use this function to get help on image acquisition objectproperties. For more information on overloaded func

Seite 174

12Functions — AlphabeticalList

Seite 175

clearPurpose Clear image acquisition object from MATLAB workspaceSyntax clear objDescription clear obj removes the image acquisition object obj from t

Seite 176

closepreviewPurpose Close Video Preview windowSyntax closepreview(obj)closepreviewDescription closepreview(obj) stops the image acquisition object obj

Seite 177 - Specifying the Color Space

deletePurpose Remove image acquisition object from memorySyntax delete(obj)Description delete(obj) removes obj, an image acquisition object or array o

Seite 178

dispPurpose Display method for image acquisition objectsSyntax objdisp(obj)Description obj displays summary information for im age acquisition object

Seite 179 - Viewing Acquired Data

1 Getting StartedThe follow ing figure shows the Video P review window for the e xample.Video Preview WindowToclosetheVideoPreviewwindow,clicktheClose

Seite 180 - Retrieving Timing Information

dispThis example shows the summary information dis played for an array ofvideo input objects.vid2 = videoinput('wi nvideo');[vid vid2]Video

Seite 181

flushdataPurpose Remove data from memory buffer used to store acquired image framesSyntax flushdata(obj)flushdata(obj,mode)Description flushdata(obj)

Seite 182

getPurpose Image acquisition object propertiesSyntax get(obj)V = get(obj)V = get(obj,Property Name)Description get(obj) displays all property names an

Seite 183

getdataPurpose AcquiredimageframestoMATLABworkspaceSyntax data = getdata(obj)data = getdata(obj,n )data = getdata(obj,n ,type)data = getdata(obj,n ,ty

Seite 184

getdataType String Data Type'uint8'Unsigned 8-bit integer'uint16'Unsigned 16-bit integer'uint32'Unsigned 32-bit integer&

Seite 185 - Using Events and Callbacks

getdatais measured continuously with respect to 0 until the acquisition stops.When the acquisition stops, the o bject’sRunning property is set to &apo

Seite 186 - 7 Using Events and Callbacks

getdatadata = getdata(obj);Display each image frame acquired.imaqmontage(data);Remove the video input object from memory.delete(obj);See Also getsnaps

Seite 187

getselectedsourcePurpose Currently selected video source objectSyntax src = getselectedsou rce(obj)Description src = getselectedsou rce(obj) searches

Seite 188 - Event Types

getsnapshotPurpose Immediately return single image frameSyntax frame = getsnapshot( obj)Description frame = getsnapshot( obj) immediately returns one

Seite 189

getsnapshotAcquire an d display a single frame of data.frame = getsnapshot(o bj);image(frame);Remove the video input object from memory.delete(obj);Se

Seite 190

Basic Image Acquisition ProcedureStep 5: Configure Object Properties (Optional)After creating the video input object and previewing the video stream,

Seite 191 - Retrieving Event Information

imaqfindPurpose Find image acquisition objectsSyntax imaqfindout = imaqfindout = imaqfind(Prope rtyName, Value, Proper tyNa me2, Value2,...)out = imaq

Seite 192

imaqfindNote When searching for properties with specific values, imaqfindperforms cas e-s ensitive searches. For example, if the value of an object’sN

Seite 193 - Data Fields for Timer Events

imaqhelpPurpose Image acquisition object function and property helpSyntax imaqhelpimaqhelp(Name)imaqhelp(obj)imaqhelp(obj,Name)out = imaqhelp(...)Desc

Seite 194

imaqhelpvid = videoinput('dt' , 1) ;src = getselectedsourc e(vid);imaqhelp(vid, 'Tri gger Type')imaqhelp(src, 'Fra meRa te&ap

Seite 195

imaqhwinfoPurpose Information about available image acquisition hardwareSyntax out = imaqhwinfoout = imaqhwinfo(ada ptorname)out = imaqhwinfo(ada ptor

Seite 196

imaqhwinfois an array o f device objects, then out is a 1-b y-n cell array of s tructureswheren is the length of obj.out = imaqhwinfo(obj ,field) retu

Seite 197

imaqhwinfoThis example returns informatio n about a specific device accessiblethrough a particular adaptor. You identify the device by its device ID.d

Seite 198

imaqhwinfowinvideoSee Also imaqhelp, im aqreset12-23

Seite 199

imaqmemPurpose Limit memory or display memory usage for Image A cquisition ToolboxSyntax mem = imaqmemimaqmem(field)imaqmem(limit)Description mem = im

Seite 200

imaqmemimaqmem(field) returns information for the field specified by the textstringfield.imaqmem(limit) configures the fram e memory limit, in bytes,

Seite 201 - 3 Acquir

1 Getting Startedget(vid)The get fun c tion lists all the properties of the object with their current values.General Settings:DeviceID = 1DiskLogger =

Seite 202

imaqmemSpecify the amount of memory available for the toolbox to log imag eframes (FrameMemoryLimit).imaqmem(30000000)ans =MemoryLoad: 85TotalPhys: 26

Seite 203

imaqmontagePurpose Sequence of im age frames as montageSyntax imaqmontage(frames)imaqmontage(obj)imaqmontage(...,CLIM)imaqmontage(..., 'CLim&apos

Seite 204

imaqmontageCreate an axes object.a = axes;Display each image frame acquired on axes a.imaqmontage(data, 'Parent', a);Remove the video input

Seite 205 - DeviceBlockinSimulink

imaqresetPurpose Disconnect and delete all image acquisition objectsSyntax imaqresetDescription imaqreset deletes any image acquisition objects that e

Seite 206

imaqtoolPurpose Launch Image Acquisition ToolSyntax imaqtoolimaqtool(file)Description imaqtool launches an inte ractive GU I to allo w you to ex plore

Seite 207 - Opening the Block Librar y

isloggingPurpose Determine w hether video input object is loggingSyntax bool = islogging(obj )Description bool = islogging(obj ) returns true if th e

Seite 208

isloggingStart one of the video input o bjects again, such as vid,anduseislogging to determine w hich of the two objects is logging.start(vid)bool = i

Seite 209 - Introduction

isrunningPurpose Determine w hether video input object is runningSyntax bool = isrunning(obj )Description bool = isrunning(obj ) returns true if th e

Seite 210 - Step 2: Open a Mod

isrunningPropertiesRunning12-34

Seite 211 - Step 3: Drag the F

isvalidPurpose Determine whether image acquisition object is as sociated with imageacquisition deviceSyntax bool = isvalid(obj)Description bool = isva

Seite 212 - Step 4: Drag Othe

Basic Image Acquisition ProcedureNote Video source object pro perties are d ev ice specific. The list o f propertiessupported by the device connected

Seite 213

loadPurpose Load image acquisition object into MATLAB workspaceSyntax load filenameload filename obj1 obj2 ...S = load(filename,ob j1,obj2,...)Descrip

Seite 214 - Step 5: Connect t

obj2mfilePurpose Convert video input objects to MATLAB codeSyntax obj2mfile(obj,filename)obj2mfile(obj,filename,syntax)obj2mfile(obj,filename,syntax,m

Seite 215

obj2mfileobj2mfile(obj,filename,syntax) converts obj to the equivalentMATLAB code wheresyntax specifies how ob j2mf ile assigns valuesto properties of

Seite 216 - Step 7: Run the Si

obj2mfileString Description{'reuse'}Findand modify an existing objec t, if the existing objectis associated with the same adaptor and the va

Seite 217 - Additional Hardware

obj2mfiledelete(vidobj);clear vidobj;Execute the M-file to recreate the object. N ote that obj 2mfile createsand configures the associated video sourc

Seite 218

peekdataPurpose Most recently acquired image dataSyntax data = peekdata(obj, frames)Description data = peekdata(obj, frames) returns data containing t

Seite 219 - For More Information

peekdataThe behavior of peekdata depends on the settings of the Running andtheLogging properties.Running Logging Object State ResultOn Off The object

Seite 220

previewPurpose Preview of live video dataSyntax preview(obj)preview(obj,himage)himage = preview(... )Description preview(obj) creates a Video Previe w

Seite 221

previewThe Video Preview wind ow remains acti ve until it is either stoppedusingstoppreview or closed using closeprevi ew.Ifyoudeletetheobject, by cal

Seite 222 - 10 Troubleshooting

previewObject State Preview Window BehaviorRunning=onIf Trigge rType is set to immedia te or manual,theVideo Preview window continues to update the im

Seite 223

Revision HistoryMarch 2003 First printing New for Version 1.0 (Release 13+)September 2003 Online only Revised for Version 1.1 (Release 13SP1)June 2004

Seite 224

1 Getting Startedby referencing the property as you would reference a field in a MATLABstructure.vid.FrameGrabInterval = 5;To set the value of a video

Seite 225 - IFC Devices

previewThe event structure contains the following fields:Field DescriptionDataCurrent image frame specified as an H- by-W-by-Bmatrix where H and W are

Seite 226

propinfoPurpose Property characteristics for image acquisition objectsSyntax out = propinfo(obj)out = propinfo(obj,P ropertyName)Description out = pro

Seite 227 - Sapera Devices

propinfoarray of strings, propinfo returns a structure for each property, storedin a cell array.Examples Create the video input object vid.vid = video

Seite 228

savePurpose Save image acquisition objects to MAT-fileSyntax save filenamesave filename obj1 obj2 ...save(filename,obj1,obj2,...)Description save file

Seite 229

setPurpose Configure or display image acquisition object propertiesSyntax set(obj)prop_struct = set(ob j)set(obj,PropertyName)prop_cell = set(obj, Pro

Seite 230

setobjects, in which case set configures the prope rty values for all theimage acquisition objects specified.set(obj,S) configures the properties of o

Seite 231 - Installing the Driver

star tPurpose Obtain exclusive use of image a cquisition deviceSyntax start(obj)Description start(obj) obta ins exclusiv e u se of the image a cquisit

Seite 232

startAn image acquisition object stops running when one of the followingconditions is met:• Thestop function is issued.• The requested number of frame

Seite 233 - 6 Select Camer

stopPurpose Stop video input objectSyntax stop(obj)Description stop(obj) halts an a cquisition associated with the video input objectobj. obj can be e

Seite 234

stoppreviewPurpose Stop previewing video dataSyntax stoppreview(obj)Description stoppreview(obj) stops the previewing of video d ata from imageacquisi

Seite 235 - To exit

Basic Image Acquisition ProcedureIn the example, because the TriggerTy pe property is set to 'immediate'(the default) and the Trigge rRepeat

Seite 236

triggerPurpose Initiate data loggingSyntax trigger(obj)Description trigger(obj) initiates data logging for the video input object obj. objcan be eithe

Seite 237 - 2 If your hardw

triggerconfigPurpose Configure video input object trigger propertiesSyntax triggerconfig(obj,type)triggerconfig(obj,type,condit ion)triggerconfig(obj,

Seite 238

triggerconfiginput object obj using co nfi g, a MATLAB structure with field namesTriggerType, TriggerCondit ion,andTrigge rSource,eachcontainingthe d

Seite 239 - 2 Select Start

triggerconfigdelete(vid);See Also imaqhelp, trigger, trig geri nfo, videoinput12-59

Seite 240

triggerinfoPurpose Provide i nformation abo ut available trigger configurationsSyntax triggerinfo(obj)triggerinfo(obj,type)config = triggerinfo (...)D

Seite 241

triggerinfo2 Get information about the available trigger configurations for thisobject.config = triggerinfo( vid)config =1x2 struct array with fiel ds

Seite 242

videoinputPurpose Create video input objectSyntax obj = videoinput(ada ptorname)obj = videoinput(ada ptorname,deviceID)obj = videoinput(ada ptorname,d

Seite 243

videoinputThe property name and property value pairs can be in any formatsupported by theset function, i.e., parameter/value string pairs,structures,

Seite 244

videoinputSee Also delete, imaqfind, isvalid, preview12-64

Seite 245 - Diagnostic Tool

waitPurpose Wait until image acquisition object stops running or loggingSyntax wait(obj)wait(obj,waittime)wait(obj,waittime,state)Description wait(obj

Seite 246

1 Getting StartedNote The example uses functions in Image Processing Toolbox.% Create video input obje ct.vid = videoinput('dcam ',1,'Y

Seite 247 - Function

waitAn image a cquisition object stops running or logging when one of thefollowing conditions is met:• Thestop function is issued.• The requested numb

Seite 248

13Properties — By CategoryThis chapter contains brief descriptions of all the properties of the video inputobject and the properties of the video sour

Seite 249

13 Properties — By CategoryVideo Input ObjectsGeneral (p. 13-2)General image acquisition propertiesCallback (p. 13-3)Properties related to callback e

Seite 250 - Objects G eneral Purpose

Video Input ObjectsNameSpecify name of image acquisit ionobjectNumberOfBandsIndicate number of color bands indata to be acquiredPreviewingIndicate w h

Seite 251 - Triggering

13 Properties — By CategoryFramesAcquiredFcnCountSpecify number of frames that mustbe acquired before frames acquiredevent is g eneratedStartFcnSpecif

Seite 252 - 11 Functions — By C atego ry

Video Input ObjectsAcquisition SourceSelectedSourceNameSpecify name of currently selectedvideo sourceSourceIndicate video source objectsassociated wit

Seite 253

13 Properties — By CategoryVideo Source ObjectsVideo input objects create one or more video s ource objects that representtheimageacquisitiondatasourc

Seite 254

14Properties — AlphabeticalList

Seite 255 - Functions — Alphabetical

BayerSensorAlignmentPurpose Specify sensor alignment for Bayer demosaicingDescription If the ReturnedColorSpace property is set to 'b ayer',

Seite 256 - Syntax clear obj

BayerSensorAlignmentThe value of this property is only used if the ReturnedColorSpaceproperty is set to 'bayer'.CharacteristicsAccess R ead/

Seite 257 - Syntax closepreview(obj)

Basic Image Acquisition ProcedureThe follow ing figure show s how the exam ple di splays detected m otion. In thefigure, areas representing movement a

Seite 258 - Syntax delete(obj)

DeviceIDPurpose Identify image acquisition device represented by video input objectDescription The DeviceID property identifies the device represented

Seite 259 - Syntax obj

DeviceIDUse the imaqhwinfo function again, specifying the name of the adaptor,to find out how many devices are available through that adaptor. Theimaq

Seite 260 - See Also videoinput

DiskLoggerPurpose Specify MATLAB AVI file object us ed to log dataDescription The DiskLogger property specifies the AVI file object u sed to log dataw

Seite 261 - Syntax flushdata(obj)

DiskLoggerExamples Create and configure an AV I file object.file = avifile('logfi le.avi');file.Quality = 50;Create and co nfigure a video i

Seite 262 - See Also set, videoinput

DiskLoggerFrameCountPurpose Specify number of frames written to diskDescription The DiskLoggerFra meCount property indicates the current number offram

Seite 263 - Syntax data = getdata(obj)

ErrorFcnPurpose Specify M-file callback function to execute when run-time error occursDescription The ErrorFcn property specifies the function to exec

Seite 264

EventLogPurpose Store information about eventsDescription The EventLog property is an array of structures that stores informationabout events. Each st

Seite 265

EventLogCharacteristicsAccess Read onlyData typeStructure arrayValues Default is empty structure array.Examples Create a video input o bject.vid = vid

Seite 266

FrameGrabInter valPurpose Specify how often to acquire frame from video streamDescription The FrameGrab Interval property specifies how often the vide

Seite 267

FrameGrabIntervalCharacteristicsAccess Read only while runningData typedoubleValuesAny positive integer. The default value is1 (acquireevery frame).Se

Seite 268

1 Getting StartedThe third dimension represents the number of color bands in the image.Because the example data is a grayscale image, the third dimens

Seite 269 - , imaqhelp, peekdata

FramesAcquiredPurpose Indicate total number of frames acquiredDescription The Fr amesAcquired property indicates the total number of framesthat the ob

Seite 270 - Syntax imaqfind

FramesAcquiredFcnPurpose Specify M-file e xecuted when spe cified number of frames have beenacquiredDescription The FramesAcquir edFcn specifies the M

Seite 271 - See Also get, videoinput

FramesAcquiredFcnCountPurpose Specify number of frames tha t must be acquired before frames acquiredevent is generatedDescription The FramesAcquiredFc

Seite 272 - Syntax imaqhelp

FramesAvailablePurpose Indicate number of frames available in m emory bufferDescription The FramesA vailable property indicates the total number of fr

Seite 273 - See Also propinfo

FramesPerTriggerPurpose Specify number of frames to acquire per trigg er using selected videosourceDescription The Fram esPerTrigger property specifie

Seite 274 - Syntax out = imaqhwinfo

InitialTriggerTimePurpose Record absolute time of first triggerDescription The InitialTriggerTi me property records the absolute time of the firsttrig

Seite 275

InitialTriggerTimesprintf('%d:%d:%d', t(4),t(5),t(6))ans =13:26:20See Also Functionsclock, getdataPropertiesEventLog, Logging, Trigg erTy pe

Seite 276

LoggingPurpose Indicate whether object is currently logging dataDescription The Logging property indicates whether the video input object iscurrently

Seite 277 - See Also imaqhelp, im aqreset

LoggingModePurpose Specify destination for acquired d ataDescription The Loggi ngMode property specifies w here you want the video inputobject to stor

Seite 278 - Syntax mem = imaqmem

LoggingModePropertiesDiskLogger, Logging14-23

Seite 279

2IntroductionThis chapter describes Image Acquisition Toolbox and its components.Overview (p. 2-2)Provides an overview of ImageAcquisition ToolboxSett

Seite 280 - , getdata, vide oinp ut

NamePurpose Specify name of image acquisition objectDescription The Name property specifies a descriptive name for the image acquisitionobject.Charact

Seite 281 - Syntax imaqmontage(frames)

NumberOfBandsPurpose Indicate number of color bands in data to be acquiredDescription The NumberOfBands property indicates the number of color bands i

Seite 282 - Create an axes object

NumberOfBandsIf you retrieve the value of the VideoForm at property, you can see thatthe video data is in R GB format.get(vid,'VideoFormat')

Seite 283 - See Also delete, vid eoinput

ParentPurpose Identify video input object that is pare nt of video source objectDescription The Parent property identifies the video input object that

Seite 284 - Syntax imaqtool

PreviewingPurpose Indicate whether o bject is currently previewing data in separate windowDescription The Previewing property indicates whether the ob

Seite 285 - Syntax bool = islogging(obj )

ReturnedColorSpacePurpose Specify color space used in MATLABDescription The ReturnedColorSpace property specifies the co lo r space youwantthetoolboxt

Seite 286 - Properties

ROIPositionPurpose Specify region-of-interest (ROI) windowDescription The ROIPositi on property specifies the region-of-interest acquisitionwindow. Th

Seite 287 - Syntax bool = isrunning(obj )

ROIPositionCharacteristicsAccess Read only while runningData type1-by-4 element vector of doublesValues Default is [ 0 0 width height ] where width an

Seite 288

RunningPurpose Indicate whether video input object is ready to a c qu ire dataDescription The Running property indicates if the video input object is

Seite 289 - Syntax bool = isvalid(obj)

SelectedPurpose Indicate whether video source object will be used for acquisitionDescription The Selected property indicates if the video source objec

Seite 290 - Syntax load filename

2 IntroductionOver viewIn this section.. .“Introduction” on page 2-2“Toolbox Components” on page 2-3“The Image Acquisition Tool (GUI )” on page 2-3“Su

Seite 291

Selectedsrc = getselectedsour ce(vid);View its Name and Sel ect ed properties.src.SourceNameans =input1src.Selectedans =onSee Also Functionsgetselecte

Seite 292

SelectedSourceNamePurpose Specify name of currently selected video sourceDescription The SelectedSour ceNa me property specifies the name of the video

Seite 293

SourcePurpose Indicate video source objects associated with vide o input objectDescription The Source property is a vector of video source objects tha

Seite 294

SourceExamples Create an image acquisition object.vid = videoinput('mat rox');To access all the video source objects associated with a video

Seite 295

SourceNamePurpose Indicate name of video source objectDescription The SourceName property indicates the name of a video source object.SourceName is on

Seite 296

Star tFcnPurpose Specify M-file executed when start event occursDescription The StartFcn property specifies the M-file function to execute when astart

Seite 297 - Syntax preview(obj)

StopFcnPurpose Specify M-file executed w hen stop e vent occursDescription The StopFcn property specifies the M-file function to execute when astop ev

Seite 298

TagPurpose Specify descriptive text to associate with i mage acquisition objectDescription The Ta g property specifies any descriptive tex t t hat y o

Seite 299

TimeoutPurpose Specify how long to wait for image dataDescription The Timeout property specifies the amount of time (in seconds) that thegetdata and g

Seite 300

TimerFcnPurpose Specify M-file callback function to e xecute when timer event occursDescription The TimerFcn property specifies the M-file callback fu

Seite 301 - Syntax out = propinfo(obj)

OverviewToolbox ComponentsThe toolbox usescomponents called hardware device adaptors to connect todevices throughtheir drivers. The toolbox includes a

Seite 302 - See Also imaqhelp

TimerPeriodPurpose Specify number of seconds between timer ev entsDescription The Tim erPeriod property specifies the amount of time, in seconds,that

Seite 303 - Syntax save filename

TriggerConditionPurpose Indicate required condition before trigger event occursDescription The TriggerCond ition property indicates the condition that

Seite 304 - Syntax set(obj)

TriggerConditionPropertiesTriggerSource, Tr iggerType14-46

Seite 305

TriggerFcnPurpose Specify M-file callback function to execute when trigger event occursDescription The Trigger Fcn pr operty specifies the M-file call

Seite 306 - Syntax start(obj)

TriggerFrameDelayPurpose Specify number of frames to skip before acquiring frames after triggeroccursDescription The Tri ggerFrameDelay property speci

Seite 307

TriggerFrameDelayPropertiesFramesPerTrigger14-49

Seite 308 - Syntax stop(obj)

TriggerRepeatPurpose Specify numbe r of add itio n al times to execute triggerDescription The TriggerRepea t property specifies the number of addition

Seite 309 - Syntax stoppreview(obj)

TriggersExecutedPurpose Indicate total number of e xecuted triggersDescription The TriggersExecuted property indicates the total number of triggerstha

Seite 310 - Syntax trigger(obj)

TriggerSourcePurpose Indicate hardware source to monitor for trigger conditionsDescription The TriggerSource property indicates the hardware source th

Seite 311

TriggerTypePurpose Indicate typ e of trigger used by video in put objectDescription The T riggerType property indicates the type of trigger used by th

Seite 312 - Examples Example 1

2 Introductiondata. You can log the data to MATLAB in several formats, and also generatean AVI file, right from the tool.To open the tool, select Star

Seite 313

TriggerTypePropertiesTriggerCondition, TriggerSource14-54

Seite 314 - Syntax triggerinfo(obj)

TypePurpose Identify type of image acquisition objectDescription The Type property identifies the type of image acquisition object. Animage acquisitio

Seite 315 - , trigg erconfig

UserDataPurpose StoredatatoassociatewithimageacquisitionobjectDescription The UserDat a property specifies any data that you want to associatewith an

Seite 316

V ideoFormatPurpose Specify video format or name of device configuration fileDescription The VideoFo rmat property specifies the video format used by

Seite 317

VideoFormatAdaptorDllName: [1 x73 char]AdaptorDllVersion: '2.1 (R2007a)'AdaptorName: 'winv ideo 'DeviceIDs: {[1]}DeviceInfo: [1x1

Seite 318 - , imaqfind, isvalid, preview

VideoResolutionPurpose Indicate width and height of incoming video streamDescription The VideoResolu tion property is a two-element vector indicatingt

Seite 319 - Syntax wait(obj)

VideoResolution14-60

Seite 320

15Blocks — Alphabetical List

Seite 321 - Properties — By Category

From Video DevicePurpose AcquireliveimagedatafromimageacquisitiondeviceLibrary Image Acquisition ToolboxDescriptionThe From Video Device block lets yo

Seite 322 - Video Input Objects

From Video D eviceFor more information on these features, see the Simulinkdocumentation.Note For a n in-depth example of using this block, see Using t

Seite 323 - Callback

Setting Up Image Acquisition HardwareSetting Up Image Acquisition HardwareIn this section.. .“Introduction” on page 2-5“Setting Up Frame Grabbers” on

Seite 325 - Acquisition Source

From Video D eviceThe second diagram illustrates the options that may appear if yourdevice supports using either one output port or multiple output po

Seite 326 - Video Source Objects

From Video Deviceconnected to your system. All video capture devices supported byImage Acquisition Toolbox are supported by the block.Video formatShow

Seite 327 - Properties — Alphabetical

From Video D eviceROI positionUse this field to input a row vector that specifies the region ofacquisition in the video image. The format is [row, col

Seite 328 - BayerSensorAlignment

From Video Devicecorresponding to the uncompressed red, green, and blue colorbands. Note that some devices will use Y CbCr for the separatecolor signa

Seite 329

Video Input (Obsolete)Purpose Connect to image acquisition deviceLibrary Image Acquisition ToolboxDescription The Video Input block is obsolete. It ma

Seite 330 - DeviceID

Video Input (Obsolete)Device nameThe image acquisition device to which you want to connect. Theitems in the list vary, depending on which devices you

Seite 331

AExamplesUse this list to find examples in the documentat ion.

Seite 332 - DiskLogger

A ExamplesFundamentals“Basic Image Acquisition Procedure” on page 1-5“Determining the Device Adapto r Name” on page 4-3“Determining the Device ID ” o

Seite 333

Acquiring Image DataAcquiring Image Data“Specifying Trigger Type, Source, and Condition” on page 5-6“Example: Using an Immediate Trigger” on page 5-11

Seite 335 - ErrorFcn

2 IntroductionSetting Up Generic Windows V ideo AcquisitionDevicesIEEE 1394 (FireWire) and generic Windows v ideo acquisition devices that useWindows

Seite 337

IndexIndexAacquiring data 3-21acquiring imagesbasic procedure 1-5connecting to devices 4-1overview 5-3specifying a delay 5-28specifying the amount 5-2

Seite 338 - FrameGrabInter val

Indextroubleshooting 10-4DALSA Coreco Sapera devicesdetermining driver version 10-7troubleshooting 10-6dark frames 3-24Data Translation devicestrouble

Seite 339 - FrameGrabInterval

IndexFirewire (IE EE 1394) Digital Camera (DCAM)specificationsupport for 2-4flushdata function 12-7using 5-37frame delayspecifying 14-48frame grabbers

Seite 340 - FramesAcquired

Indexspecifying a delay 14-48specifying the timeout value 14-42time-based acquisition 6-5using timers with 14-43image acquisition devices 2-2adaptors

Seite 341 - FramesAcquiredFcn

Indeximaqcallback functionusing default callback function 7-2imaqfind function 12-16using 4-28imaqhelp function 12-18getting prope rty information 4-2

Seite 342 - FramesAcquiredFcnCount

IndexPreview window 3-19previewingclosing the preview window 2-11creating custom preview GUIs 2-11opening the Video Pre view window 2-9performing cust

Seite 343 - FramesAvailable

Indexspecifying period of 14-44specifying with image acquisition 14-43timing of acquisitionretrieving 6-20trigger eventsdefinition 7-6information re t

Seite 344 - FramesPerTrigger

Indexopening 2-9stopping the p review video s tre a m 2-10troubleshooting 10-26video source objectsarray of 14-36currently selected source 14-33displa

Seite 345 - InitialTriggerTime

Setting Up Image Acquisition HardwareTherateatwhichImageAcquisitionToolbox can process images depends onthe processor speed, the complexity of the pro

Seite 346

2 IntroductionPreviewing DataIn this section.. .“Introduction” on page 2-8“Opening a Video Preview Window” on page 2-9“Stopping the P review Video Str

Seite 347 - See Also Functions

Previewing Data• “Performing C ustom Processing of Previewed Data” on page 2-13Opening a Video Preview WindowTo open a Video Preview window, use the p

Seite 348 - LoggingMode

2 IntroductionStoppingthe Preview Video StreamWhen youuse thepreview function to start previewing image data, the VideoPreviewwindow displays a view o

Seite 349

Previewing DataTo restart the video stream in the Video Preview window, call preview againon the same v id eo input object.preview(vid)Closing a Video

Seite 350 - Characteristics

2 Introduction% Create a video input object .vid = videoinput('winv ideo');% Create a figure window. Thi s ex ampl e tu rns off the default%

Seite 351 - NumberOfBands

Previewing DataPerforming Custom Processing of Previewe d DataWhen you specify an image object to the preview function (see “Preview ingData in Custom

Seite 352

2 IntroductionArgument DescriptionA data structure containing the following fields:DataCurrent image frame specified as anH-by-W-by-B array, where H i

Seite 353

Previewing Dataht = getappdata(himage ,'HandleToTimestamp Label');% Set the value of the text label .set(ht,'String',tstampstr);%

Seite 354 - Previewing

ContentsGetting Started1What Is Image Acquisition Toolbox?...1-2Overview... 1-2Installation and Con

Seite 355 - ReturnedColorSpace

2 Introduction% Set up the push buttonsuicontrol('String', 'Start Preview',...'Callback', 'previ ew( vid)',...

Seite 356 - ROIPosition

Previewing Data% Make handle to text label available to update function.setappdata(hImage,'HandleToTimesta mpLabel',hTextLabel);preview(vid,

Seite 357

2 Introduction2-18

Seite 358 - See Also Properties

3Using the Image AcquisitionTool GUIThe Image Acquisit ion Tool Desktop(p. 3-2)Describes opening the tool andall the parts of the desktop userinterfac

Seite 359 - Selected

3 Using the Image Acquisition Tool GUIThe Image Acquisition Tool DesktopIn this section.. .“Opening the Tool” on page 3-2“Parts of the Desktop” on pag

Seite 360

The Image Acquisition Tool Desktop• Hardware Browser – Shows the image acquisition devices currentlyconnected to your system. Each device is a separat

Seite 361 - SelectedSourceName

3 Using the Image Acquisition Tool GUISee “Selecting Your Device” on page 3-5 for more information about usingthe Hardware Browser.• Preview window –

Seite 362

Selecting Your DeviceSelecting Your DeviceIn this section.. .“Selecting a Device and Format” on p age 3-5“Adding New Hardware” on page 3-6“Using a Cam

Seite 363

3 Using the Image Acquisition Tool GUISelectthedeviceformatorcamerafileyouwanttousefortheacquisitionbyclicking its name in the tree. When the format i

Seite 364 - SourceName

Selecting Your DeviceAcqu isition Har dware to display the new device in the HardwareBrowser.Using a Camera FileIf y our device supports the use of a

Seite 365 - Star tFcn

Setting Up DCAM Devices ... 2-6Resetting Your Image Acquisition Hardware... 2-6A Note About Frame Rates and Processing

Seite 366

3 Using the Image Acquisition Tool GUISetting Acquisition Para m ete rsIn this section.. .“Using the A cquisition Parameters Pane” on page 3-8“Setting

Seite 367

Setting Acquisition ParametersSetting Frames Per TriggerThe Frames Per Trigger field on the General tabisusedtosetthenumberof frames per trigger you w

Seite 368

3 Using the Image Acquisition Tool GUINote Some devices need a few frames to warm up, or may a lways skip thefirst frame. If your device does that, ch

Seite 369 - TimerFcn

Setting Acquisition Parameters3 Start your acquisition using those settings.Setting Device-Specific Param etersUse the Device Properties tabtovieworch

Seite 370 - TimerPeriod

3 Using the Image Acquisition Tool GUIUse the properties table to view or edit properties:• If a property has a pencil icon in the value column of the

Seite 371 - TriggerCondition

Setting Acquisition ParametersLogging Your DataUse the Logging tab to set up logging options. T his determines where yourdata is logged to when you d

Seite 372

3 Using the Image Acquisition Tool GUIMemory LoggingIf you select Memory or Disk and M em ory in the Logging To fiel d, theMemory Limit fie ld will di

Seite 373 - TriggerFcn

Setting Acquisition Parameters4 Set your Frame Rate, which is the rate in frames per second that thelogged AVI file is displayed when you play it back

Seite 374 - TriggerFrameDelay

3 Using the Image Acquisition Tool GUItriggers, you stop the acquisition manually by clicking the Stop AcquisitionbuttoninthePreview window.Selecting

Seite 375

Setting Acquisition ParametersTo perform hardware triggering:1 Select your device format and optionally click Start Preview to previewthe device.2 Opt

Seite 376 - TriggerRepeat

Exporting Data ... 3-26Saving Image Acquisition Tool Configurations... 3-28Exporting Hardware Configurations to M

Seite 377 - TriggersExecuted

3 Using the Image Acquisition Tool GUI6 Click the Start Acquisition button to ge t live feed from the device.7 When the Trigger Condition is met, the

Seite 378 - TriggerSource

Previewing and Acquiring DataPreviewing and A cquiring DataIn this section.. .“The Preview Window” on page 3-19“Previewing Data” on page 3-21“Acquirin

Seite 379 - TriggerType

3 Using the Image Acquisition Tool GUIUse the buttons in the Preview window to:• Preview your image. See “Previewing Data” on page 3-21 for moreinform

Seite 380

Previewing and Acquiring Data• Export data. See “Exporting Data” on page 3-26 for more information.Below the area that displays the frames you will se

Seite 381

3 Using the Image Acquisition Tool GUIThenodeslistedunderthedevicenamearetheformatsthedevicesupports.They may correspond to the different resolutions

Seite 382 - UserData

Previewing and Acquiring DataFor more information about logging, see “Logging Your Data” on page 3-13.6 Start the acquisition by clicki ng t he Start

Seite 383 - V ideoFormat

3 Using the Image Acquisition Tool GUIIf Images Are Blurry or DarkIf the first one or more frames of your acquisition are blurry, black, or of lowqual

Seite 384 - VideoFormat

Previewing and Acquiring DataYou can allow for device warm-up by using manual trigge ring. This allowsyou to start the acquisition after the device ha

Seite 385 - VideoResolution

3 Using the Image Acquisition Tool GUIExpor ting DataYou can export the data tha t has been acquired in memo ry to a MAT-fileor the MATLAB Workspace.T

Seite 386

Exporting Data4 If yo u exported to the MATLAB Workspace, the dialog box closes and thedata will be saved to the MATLAB Workspace.If you are exporting

Seite 387 - Blocks — Alphabetical List

Using the obj2mfile C ommand ... 4-30Acquiring Image Data5Data Logging ... 5-3Overview...

Seite 388 - From Video Device

3 Using the Image Acquisition Tool GUISaving Image Acquisition Tool ConfigurationsYou can save the configuration information abo ut any of y our devic

Seite 389 - From Video D evice

Saving Image Acquisition Tool ConfigurationsThe configuration is saved to an Image Acquisition Tool (IAT) file in thelocation you specified.Yo u can t

Seite 390

3 Using the Image Acquisition Tool GUIExpor ting Hardware Configurations to M AT LABYo u can export the video input objects and their configured param

Seite 391

Expor ting Hardware Configurations to MATLAB3 Decide what object configuration(s) to export.The Object Ex porter dialog box lis ts the currently selec

Seite 392

3 Using the Image Acquisition Tool GUI3-32

Seite 393

4Connecting to HardwareTo connect to an image acquisition device from w ithin MATLAB, you mustcreate a video input object. This object represents the

Seite 394

4 Connecting to HardwareDeleting Image Acquisition Objects(p. 4-28)Describes how to delete the imageacquisition obje c ts you createSaving Image Acqui

Seite 395 - Video Input (Obsolete)

Getting Hardware Inform ationGetting Hardware InformationIn this section.. .“Getting Hardware Information” on page 4-3“DeterminingtheDeviceAdaptorName

Seite 396

4 Connecting to Hardwarevisit the Image Acquisition Toolbox product page at the MathWorks Web site(www.mathworks.com/products/imaq).To determin e whic

Seite 397 - Examples

Getting Hardware Inform ationinfo = imaqhwinfo('ma trox');info =AdaptorDllName: [1 x73 char]AdaptorDllVersion: '2.1 (R2007a)'Adapt

Seite 398 - Image Acquisition Tool (GUI)

Logging Image Data to Disk ... 5-40Logging Data to Disk... 5-40Creating an AVI File Object for Logging

Seite 399 - Events and Callbacks

4 Connecting to HardwareDefaultFormat: 'M_ RS17 0'DeviceFileSupported: 1DeviceName: 'Orion 'DeviceID: 1ObjectConstructor: 'vi

Seite 400 - A Examples

Getting Hardware Inform ationImage acquisition devices typically support multiple v ideo formats. You canspecify the video format when you create the

Seite 401

4 Connecting to HardwareM_RS170_VIA_RGBans{3} =M_CCIRans{4} =M_CCIR_VIA_RGBans{5} =M_NTSCans{6} =M_NTSC_RGBans{7} =M_NTSC_YCans{8} =M_PALans{9} =M_PAL

Seite 402

Creating Image Acquisition ObjectsCreating Image Acquisition ObjectsIn this section.. .“Types of Objects” on page 4-9“Video Input Objects” on page 4-9

Seite 403

4 Connecting to HardwareAt any one time, only one of the video source objects, called the selectedsource, can be active. This is the source used for a

Seite 404

Creating Image Acquisition Objectsdefault videoinput syntax in the ObjectConstructor field of the d e vi ceinformation structure.vid = videoinput(&apo

Seite 405

4 Connecting to Hardwareformat, the toolbox creates a video source object for each connection. Foranexampleshowingthevideosourceobje cts created with

Seite 406

Creating Image Acquisition ObjectsThe following sections describe these options. If you do not specify a videoformat, thevideoinput function uses one

Seite 407

4 Connecting to HardwareNote For Matrox devices, the M_NTSC_ RGB format string represents acomponent video format.This example creates a video input o

Seite 408 - VideoFormat property 14-57

Creating Image Acquisition ObjectsThis example creates a video input object specifying a Matrox deviceconfiguration file as an argument.Specifying the

Kommentare zu diesen Handbüchern

Keine Kommentare