MATLAB IMAGE ACQUISITION TOOLBOX - RELEASE NOTES Guia do Utilizador

Consulte online ou descarregue Guia do Utilizador para Software MATLAB IMAGE ACQUISITION TOOLBOX - RELEASE NOTES. MATLAB IMAGE ACQUISITION TOOLBOX - RELEASE NOTES User`s guide Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
Vista de página 0
Image Acquisition Toolbox™
User's Guide
R2015a
Vista de página 0
1 2 3 4 5 6 ... 573 574

Resumo do Conteúdo

Página 1 - User's Guide

Image Acquisition Toolbox™User's GuideR2015a

Página 2 - How to Contact MathWorks

x ContentsWorking with Acquired Image Data7Image Acquisition Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2Bringing Image Data into

Página 3 - Revision History

3 Using the Image Acquisition Tool GUI3-42The Object Exporter dialog box lists the currently selected device format, as wellas any others you selected

Página 4

Saving and Copying Image Acquisition Tool Session Log3-43Saving and Copying Image Acquisition Tool Session LogIn this section...“About the Session Lo

Página 5 - Contents

3 Using the Image Acquisition Tool GUI3-442In the Save Session Log dialog box, browse to the location where you want to savethe file.3Use the default

Página 6

Saving and Copying Image Acquisition Tool Session Log3-45This copies the selected contents to the system clipboard.3Go to the application or file tha

Página 7

3 Using the Image Acquisition Tool GUI3-46Registering a Third-Party Adaptor in the Image Acquisition ToolIf you are using a third-party adaptor that r

Página 8

4Image Acquisition Support Packages• “Image Acquisition Support Packages for Hardware Adaptors” on page 4-2• “Installing the Support Packages for Imag

Página 9

4 Image Acquisition Support Packages4-2Image Acquisition Support Packages for Hardware AdaptorsThe existing support for all supported hardware, such a

Página 10 - Using Events and Callbacks

Image Acquisition Support Packages for Hardware Adaptors4-3Adaptor Name Support package name in list ContentsKinect for Windows(kinect)Kinect for Win

Página 11

4 Image Acquisition Support Packages4-4Adaptor Name Support package name in list ContentsPoint Grey (pointgrey) Point Grey Hardware MATLAB files to us

Página 12

Image Acquisition Support Packages for Hardware Adaptors4-5if you have a Webcam on a Windows system and a Matrox camera, you would need toinstall the

Página 13 - Using the Matrox Interface

xiCreating and Executing Callback Functions . . . . . . . . . . . . 8-12Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Página 14 - Troubleshooting

4 Image Acquisition Support Packages4-6The following topic describes how to install the Image Acquisition Toolbox supportpackages:“Installing the Supp

Página 15

Installing the Support Packages for Image Acquisition Toolbox Adaptors4-7Installing the Support Packages for Image Acquisition ToolboxAdaptorsWith pr

Página 16 - Block Reference

4 Image Acquisition Support Packages4-82On the Select an action screen, select Install from Internet and then click Next.This option is selected by de

Página 17 - Getting Started

Installing the Support Packages for Image Acquisition Toolbox Adaptors4-9You should select the adaptor that you need to install. If you use multiple

Página 18 - 1 Getting Started

4 Image Acquisition Support Packages4-10Adaptor Name Support package name inlistContentsWindows Video(winvideo)OS Generic VideoInterfaceMATLAB files t

Página 19 - Product Overview

Installing the Support Packages for Image Acquisition Toolbox Adaptors4-11Adaptor Name Support package name inlistContentsDCAM (dcam) DCAM Hardware M

Página 20

4 Image Acquisition Support Packages4-12Adaptor Name Support package name inlistContentsHamamatsu (hamamatsu) Hamamatsu Hardware MATLAB files to useHa

Página 21 - Supported Hardware

Installing the Support Packages for Image Acquisition Toolbox Adaptors4-138If your adaptor includes third-party files, that installation starts, and

Página 23

5Connecting to HardwareTo connect to an image acquisition device from within MATLAB, you must create a videoinput object. This object represents the c

Página 24

xii ContentsLinux Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-5Mac Configuration . . . . . . . . . . . . . . . . . .

Página 25

5 Connecting to Hardware5-2Getting Hardware InformationIn this section...“Getting Hardware Information” on page 5-2“Determining the Device Adaptor Nam

Página 26

Getting Hardware Information5-3acquisition equipment and for particular classes of image acquisition devices. For thelatest information about support

Página 27

5 Connecting to Hardware5-4 AdaptorDllName: [1x73 char] AdaptorDllVersion: '2.1 (R2007a)' AdaptorName: 'matrox'

Página 28

Getting Hardware Information5-5 SupportedFormats: {1x10 cell}The fields in the device information structure provide the following information a

Página 29

5 Connecting to Hardware5-6To determine which video formats an image acquisition device supports, look in theSupportedFormats field of the DeviceInfo

Página 30

Getting Hardware Information5-7M_NTSCans{6} = M_NTSC_RGBans{7} = M_NTSC_YCans{8} = M_PALans{9} = M_PAL_RGBans{10} = M_PAL_YC

Página 31

5 Connecting to Hardware5-8Creating Image Acquisition ObjectsIn this section...“Types of Objects” on page 5-8“Video Input Objects” on page 5-8“Video S

Página 32

Creating Image Acquisition Objects5-9objects by default, but you can change this selection. See “Specifying the Selected VideoSource Object” on page

Página 33 - Step 6: Acquire Image Data

5 Connecting to Hardware5-10This syntax uses the default video format listed in the DefaultFormat field of the datareturned by imaqhwinfo. You can opt

Página 34

Creating Image Acquisition Objects5-114The Trigger Parameters section lists the trigger type configured for the object andthe number of times the tri

Página 35

xiiiAcquiring from Color and Depth Devices Simultaneously 12-23Using Skeleton Viewer for Kinect Skeletal Data . . . . . . . . 12-24Installing the Kine

Página 36

5 Connecting to Hardware5-12In this example, each of the text strings is a video format supported by a Matrox device.info = imaqhwinfo('matrox&ap

Página 37 - Step 7: Clean Up

Creating Image Acquisition Objects5-13For example, with Matrox frame grabbers, you can download digitizer configurationformat (DCF) files, in their t

Página 38

5 Connecting to Hardware5-14To illustrate, this example lists the video source objects associated with the video inputobject vid.vid.Source Displa

Página 39 - Introduction

Creating Image Acquisition Objects5-15 AdaptorName: 'winvideo' DeviceName: 'IBM PC Camera'

Página 40 - Toolbox Components Overview

5 Connecting to Hardware5-16Configuring Image Acquisition Object PropertiesIn this section...“About Image Acquisition Object Properties” on page 5-16“

Página 41 - Toolbox Components

Configuring Image Acquisition Object Properties5-17Viewing the Values of Object PropertiesTo view all the properties of an image acquisition object,

Página 42 - 2 Introduction

5 Connecting to Hardware5-18 StopFcn = [] TimerFcn = [] TimerPeriod = 1 TriggerFcn = [] Trigger Settings: InitialTriggerTime = [0 0 0

Página 43 - Supported Devices

Configuring Image Acquisition Object Properties5-19 InputFilter = lowpass UserOutputBit3 = off UserOutputBit4 = off XScaleFactor = 1 Y

Página 44

5 Connecting to Hardware5-20The imaqhelp function returns reference information about the property with acomplete description. This example uses imaqh

Página 45 - Setting Up Frame Grabbers

Configuring Image Acquisition Object Properties5-21Setting Trigger PropertiesThe values of certain trigger properties, TriggerType, TriggerCondition,

Página 46

xiv ContentsUsage Rules for System Objects in Generated MATLABCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-15

Página 47

5 Connecting to Hardware5-22Starting and Stopping a Video Input ObjectWhen you create a video input object, you establish a connection between MATLAB

Página 48 - Previewing Data

Starting and Stopping a Video Input Object5-23The following example illustrates starting and stopping an object:1Create an image acquisition object —

Página 49 - Previewing Data

5 Connecting to Hardware5-24islogging(vid)ans = 06Execute the manual trigger — Call the trigger function to execute the manualtrigger.trigger(vid)

Página 50

Deleting Image Acquisition Objects5-25Deleting Image Acquisition ObjectsWhen you finish using your image acquisition objects, use the delete function

Página 51

5 Connecting to Hardware5-26Nest a call to the imaqfind function within the delete function to delete all theseobjects from memory.delete(imaqfind)Not

Página 52

Saving Image Acquisition Objects5-27Saving Image Acquisition ObjectsIn this section...“Using the save Command” on page 5-27“Using the obj2mfile Comma

Página 53

5 Connecting to Hardware5-28Image Acquisition Toolbox PropertiesThe following properties are available in the toolbox.• BayerSensorAlignment• DeviceID

Página 54

Image Acquisition Toolbox Properties5-29• StopFcn• Tag• Timeout• TimerFcn• TimerPeriod• TriggerCondition• TriggerFcn• TriggerFrameDelay• TriggerRepea

Página 56

6Acquiring Image Data

Página 57

xvQImaging Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-18Troubleshooting QImaging Devices . . . . . . . . . . . . . . .

Página 58

6 Acquiring Image Data6-2Acquiring Image DataThe core of any image acquisition application is the data acquired from the inputdevice. A trigger is the

Página 59

Data Logging6-3Data LoggingIn this section...“Overview” on page 6-3“Trigger Properties” on page 6-4OverviewWhen a trigger occurs, the toolbox sets th

Página 60 - Parts of the Desktop

6 Acquiring Image Data6-4Overview of Data LoggingTrigger PropertiesThe video input object supports several properties that you can use to configure as

Página 61

Data Logging6-5Property DescriptionTriggerFrameDelay Specifies the number of frames to skip before loggingdata to memory, disk, or both. For more inf

Página 62

6 Acquiring Image Data6-6Setting the Values of Trigger PropertiesIn this section...“About Trigger Properties” on page 6-6“Specifying Trigger Type, Sou

Página 63

Setting the Values of Trigger Properties6-7config = triggerinfo(vid);This function returns an array of structures, one structure for each valid combi

Página 64

6 Acquiring Image Data6-8Specifying the Trigger TypeIn this section...“Comparison of Trigger Types” on page 6-8“Using an Immediate Trigger” on page 6-

Página 65

Specifying the Trigger Type6-9TriggerType Value TriggerSource andTriggerCondition ValuesDescriptiontype of trigger is used when synchronizationwith a

Página 66 - Selecting a Device and Format

6 Acquiring Image Data6-10Immediate TriggerThe following example illustrates how to use an immediate trigger:1Create an image acquisition object — Thi

Página 67

Specifying the Trigger Type6-11 TriggerType: 'immediate' TriggerCondition: 'none' TriggerSource: 'none&apos

Página 68 - Using a Camera File

xvi ContentsFunctions — Alphabetical List17Properties — Alphabetical List18Block Reference19

Página 69

6 Acquiring Image Data6-12Manual TriggerThe following example illustrates how to use a manual trigger:1Create an image acquisition object — This examp

Página 70 - Setting Frames Per Trigger

Specifying the Trigger Type6-133Start the image acquisition object — Call the start function to start the imageacquisition object.start(vid);The vide

Página 71 - Setting the Color Space

6 Acquiring Image Data6-14 0To execute another manual trigger, you must first restart the video input object.Note that this deletes the frames acq

Página 72

Specifying the Trigger Type6-15Hardware TriggerThe following example illustrates how to use a hardware trigger:1Create an image acquisition object —

Página 73

6 Acquiring Image Data6-16 'hardware' 'risingEdge' 'TTL' 'hardware' 'fallingEdge&

Página 74 - Logging Your Data

Specifying the Trigger Type6-17vid.FramesAcquiredans = 5After it executes the trigger and acquires the specified number of frames, the videoinput

Página 75

6 Acquiring Image Data6-18Trigger Mode Parameter External Source Multiple Frames Per Trigger1 none yes no2 (N >= 2) yes no3 (N >= 1) no yes4 (N

Página 76

Specifying the Trigger Type6-19If the camera supports only trigger mode 0 with source 0, then the original functionalityof having only the externalTr

Página 77 - Setting Up Triggering

6 Acquiring Image Data6-20In this mode, the duration of the trigger signal is used to control the integration time ofthe incoming light. This mode is

Página 78

Specifying the Trigger Type6-21The camera starts the integration of the incoming light from the first external triggerinput falling edge. At the Nth

Página 79

1Getting StartedThe best way to learn about Image Acquisition Toolbox capabilities is to look at a simpleexample. This chapter introduces the toolbox

Página 80 - Setting a Region of Interest

6 Acquiring Image Data6-22The camera starts integration of incoming light from the first external trigger inputfalling edge and exposes incoming light

Página 81

Specifying the Trigger Type6-23Trigger Mode 14This is a vendor-specific mode and no information is available. Consult thedocumentation for your camer

Página 82

6 Acquiring Image Data6-24Controlling Logging ParametersIn this section...“Data Logging” on page 6-24“Specifying Logging Mode” on page 6-24“Specifying

Página 83

Controlling Logging Parameters6-25vid.LoggingMode = 'disk&memory';Because the toolbox stores the image frames in Audio Video Interleave

Página 84

6 Acquiring Image Data6-26Specifying a Noncontiguous AcquisitionAlthough FramesPerTrigger specifies the number of frames to acquire, these framesdo no

Página 85 - Restoring Default Parameters

Controlling Logging Parameters6-27Acquiring 100 FramesThis example illustrates how you can specify the amount of data to be acquired anddetermine how

Página 86 - The Preview Window

6 Acquiring Image Data6-28 1005Clean up Always remove image acquisition objects from memory, and the variablesthat reference them, when you no long

Página 87

Controlling Logging Parameters6-29start(vid)The object executes an immediate trigger and begins acquiring frames of data. Thestart function returns c

Página 88 - Acquiring Data

6 Acquiring Image Data6-305Remove frames from the memory buffer — When you remove frames from thememory buffer, the object decrements the value of the

Página 89

Controlling Logging Parameters6-31Contents of Memory Buffer Before and After Removing Frames6Clean up — Always remove image acquisition objects from

Página 90

1 Getting Started1-2Image Acquisition Toolbox Product DescriptionAcquire images and video from industry-standard hardwareImage Acquisition Toolbox ena

Página 91

6 Acquiring Image Data6-32Specifying a Delay Before Data Logging BeginsSpecifying Multiple TriggersWhen a trigger occurs, a video input object acquire

Página 92

Controlling Logging Parameters6-33Executing Multiple Triggers

Página 93

6 Acquiring Image Data6-34Waiting for an Acquisition to FinishIn this section...“Using the wait Function” on page 6-34“Blocking the Command Line Until

Página 94

Waiting for an Acquisition to Finish6-35Using wait to Block the MATLAB Command LineBlocking the Command Line Until an Acquisition CompletesThe follow

Página 95

6 Acquiring Image Data6-36imaqhwinfo function to get the object constructor for your image acquisition deviceand substitute that syntax for the follow

Página 96

Waiting for an Acquisition to Finish6-37wait(vid,60)The wait function blocks the command line until the hardware trigger fires andacquisition complet

Página 97

6 Acquiring Image Data6-38Managing Memory UsageIn this section...“Memory Usage” on page 6-38“Monitoring Memory Usage” on page 6-38“Modifying the Frame

Página 98

Managing Memory Usage6-39mem_left = out.FrameMemoryLimit - out.FrameMemoryUsed;To see an example of using a callback function to monitor memory usage

Página 99

6 Acquiring Image Data6-40Freeing MemoryAt times, while acquiring image data, you might want to delete some or all of the framesthat are stored in mem

Página 100

Managing Memory Usage6-41To verify that the object deleted the frames, view the value of the FramesAvailableproperty.vid.FramesAvailableans = 105Em

Página 101 - Saving the Session Log

Product Overview1-3Product OverviewIn this section...“Introduction” on page 1-3“Installation and Configuration Notes” on page 1-4“The Image Processin

Página 102 - Copying the Session Log

6 Acquiring Image Data6-42Logging Image Data to DiskIn this section...“Logging Data to Disk Using VideoWriter” on page 6-42“Logging Data to Disk Using

Página 103

Logging Image Data to Disk6-43This example uses a GigE Vision device in a grayscale format (Mono10).1Create a video input object that accesses a GigE

Página 104

6 Acquiring Image Data6-44Guidelines for Using a VideoWriter Object to Log Image DataNote the following when using VideoWriter.• You should not delete

Página 105

Logging Image Data to Disk6-45Logging Data to a Disk FileNote: AVI files are limited to a bit-depth of 8 bits per pixel for each band. If you havehig

Página 106

6 Acquiring Image Data6-46• “Guidelines for Using an AVI File Object to Log Image Data” on page 6-46• “Closing the DiskLogger AVI file” on page 6-46Lo

Página 107

Logging Image Data to Disk6-47object (aviobj). See “Logging Data to Disk Using an AVI File” on page 6-47 for anexample.Before you close the file, mak

Página 108

6 Acquiring Image Data6-48 CurrentState: 'Open'2Configure properties of the AVI file object — You can optionally configure theproperties

Página 109

Logging Image Data to Disk6-49ans = 40Note Because it takes longer to write frames to a disk file than to memory, thevalue of the DiskLoggerFrameC

Página 111 - Adaptors

7Working with Acquired Image DataWhen you trigger an acquisition, the toolbox stores the image data in a memory buffer, adisk file, or both. To work w

Página 112

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

Página 113

1 Getting Started1-4Installation and Configuration NotesTo determine if the Image Acquisition Toolbox software is installed on your system, typethis c

Página 114

7 Working with Acquired Image Data7-2Image Acquisition OverviewWhen a trigger occurs, the toolbox acquires frames from the video stream and logsthe fr

Página 115

Bringing Image Data into the MATLAB Workspace7-3Bringing Image Data into the MATLAB WorkspaceIn this section...“Overview” on page 7-3“Moving Multiple

Página 116

7 Working with Acquired Image Data7-4main Documentation Center page, or open the file demoimaq_GetSnapshot.m in theMATLAB Editor.Moving Multiple Frame

Página 117

Bringing Image Data into the MATLAB Workspace7-5Acquiring 10 Seconds of Image DataThis example shows how you can configure an approximate time-based

Página 118

7 Working with Acquired Image Data7-6delete(vid)clear vidViewing Frames in the Memory BufferTo view sample frames from the memory buffer without remov

Página 119 - Connecting to Hardware

Bringing Image Data into the MATLAB Workspace7-7Frames Returned by peekdataNote: The peekdata function does not return any data while running if in d

Página 120 - Getting Hardware Information

7 Working with Acquired Image Data7-8In addition, configure a large enough acquisition to allow several calls to peekdatabefore it finishes.vid.Frames

Página 121 - Determining the Device ID

Bringing Image Data into the MATLAB Workspace7-9Verify that the object has not acquired any frames.vid.FramesAcquiredans = 05Trigger the acquisition

Página 122 - 5 Connecting to Hardware

7 Working with Acquired Image Data7-10Bringing a Single Frame into the WorkspaceTo bring a single frame of image data into the MATLAB workspace, use t

Página 123 - Getting Hardware Information

Working with Image Data in MATLAB Workspace7-11Working with Image Data in MATLAB WorkspaceIn this section...“Understanding Image Data” on page 7-11“D

Página 124

Product Overview1-5If you have any questions, please contact MathWorks customer service.Related ProductsMathWorks provides several products that are

Página 125

7 Working with Acquired Image Data7-12• Determines the data type used for the data• Determines the color space of the dataThis section also describes

Página 126

Working with Image Data in MATLAB Workspace7-13Video Format and Image DimensionsThe following example illustrates how video format affects the size o

Página 127 - Creating a Video Input Object

7 Working with Acquired Image Data7-14vid.VideoResolutionans = [640 480]4Bring a single frame into the workspace — Call the getsnapshot function tob

Página 128

Working with Image Data in MATLAB Workspace7-157Clean up — Always remove image acquisition objects from memory, and thevariables that reference them,

Página 129 - Specifying the Video Format

7 Working with Acquired Image Data7-16clear vidSpecifying the Color SpaceFor most image acquisition devices, the video format of the video stream dete

Página 130

Working with Image Data in MATLAB Workspace7-17use the imaqhwinfo function to get the object constructor for your image acquisitiondevice and substit

Página 131

7 Working with Acquired Image Data7-18If your camera can return Bayer data, the toolbox can automatically convert it to RGBdata for you, or you can sp

Página 132

Working with Image Data in MATLAB Workspace7-19Manual ConversionThe camera in this example has a Bayer sensor. The GigE Vision™ standard allowscamera

Página 133

7 Working with Acquired Image Data7-20ans = 480 640 Notice how the size changed from the rgb image to the grayscale image bycomparing the size output

Página 134

Working with Image Data in MATLAB Workspace7-21grayscale3Create a one-frame image img using the getsnapshot function.img = getsnapshot(vid);4View the

Página 135

1 Getting Started1-6Image Acquisition Tool (GUI)The functionality of the Image Acquisition Toolbox software is available in a desktopapplication. You

Página 136

7 Working with Acquired Image Data7-22Viewing Acquired DataOnce you bring the data into the MATLAB workspace, you can view it as you would anyother im

Página 137

Retrieving Timing Information7-23Retrieving Timing InformationIn this section...“Introduction” on page 7-23“Determining When a Trigger Executed” on p

Página 138

7 Working with Acquired Image Data7-24InitialTriggerTime Records First Trigger ExecutionThe trigger timing information is stored in MATLAB clock vecto

Página 139

Retrieving Timing Information7-25To see an example, see “Determining the Frame Delay Duration” on page 7-25.Getting the Absolute Acquisition TimeWhen

Página 140

7 Working with Acquired Image Data7-26vid = videoinput('dt',1);2Configure properties — For this example, configure a trigger frame delay lar

Página 141

Retrieving Timing Information7-27delete(vid)clear vid

Página 143

8Using Events and Callbacks

Página 144

8 Using Events and Callbacks8-2Using Events and CallbacksYou can enhance the power and flexibility of your image acquisition application byusing event

Página 145 - Using the obj2mfile Command

Using the Default Callback Function8-3Using the Default Callback FunctionTo illustrate how to use callbacks, this section presents a simple example t

Página 146

Getting Started Doing Image Acquisition Programmatically1-7Getting Started Doing Image Acquisition ProgrammaticallyIn this section...“Overview” on pa

Página 147

8 Using Events and Callbacks8-4delete(vid)clear vid

Página 148

Event Types8-5Event TypesThe Image Acquisition Toolbox software supports several different types of events. Eachevent type has an associated video in

Página 149 - Acquiring Image Data

8 Using Events and Callbacks8-6Event Callback Property DescriptionWhen a frames acquired event occurs, thetoolbox executes the function specified by t

Página 150

Event Types8-7Event Callback Property DescriptionWhen a timer event occurs, the toolbox executes thefunction specified by the TimerFcn property.Trigg

Página 151 - Data Logging

8 Using Events and Callbacks8-8Retrieving Event InformationIn this section...“Introduction” on page 8-8“Event Structures” on page 8-8“Accessing Data i

Página 152 - 6 Acquiring Image Data

Retrieving Event Information8-9• “Data Fields for Error Events” on page 8-9• “Data Fields for Timer Events” on page 8-10Data Fields for Start, Stop,

Página 153 - Data Logging

8 Using Events and Callbacks8-10Data Fields for Timer EventsFor timer events, the Data structure contains these fields.Field Name DescriptionAbsTime A

Página 154

Retrieving Event Information8-112Start the image acquisition object — Start the image acquisition object. Bydefault, the object executes an immediate

Página 155

8 Using Events and Callbacks8-12Creating and Executing Callback FunctionsIn this section...“Introduction” on page 8-12“Creating Callback Functions” on

Página 156 - Specifying the Trigger Type

Creating and Executing Callback Functions8-13The function header for this callback function illustrates this basic syntax.function mycallback(obj,eve

Página 157 - Using an Immediate Trigger

1 Getting Started1-8Note: With previous versions of the Image Acquisition Toolbox, the files for all of theadaptors were included in your installation

Página 158

8 Using Events and Callbacks8-14t = fix(abstime);sprintf('%s %d:%d:%d','timestamp', t(4),t(5),t(6))To see how this function can be

Página 159 - Using a Manual Trigger

Creating and Executing Callback Functions8-15vid.StartFcn = {'mycallback'};To specify additional parameters, include them as additional ele

Página 160

8 Using Events and Callbacks8-16Too many input arguments.Warning: The FramesAcquiredFcn callback is being disabled.To enable a callback that has been

Página 161

Creating and Executing Callback Functions8-17delete(vid)clear vidMonitoring Memory UsageThis example creates a callback function for a timer event th

Página 162

8 Using Events and Callbacks8-18imaqhwinfo function to get the object constructor for your image acquisition deviceand substitute that syntax for the

Página 163

Creating and Executing Callback Functions8-19Memory load: 97Memory available for frames getting low.Stopping acquisition.4Clean up — Always remove im

Página 165

9Using the From Video Device Block inSimulinkThe Image Acquisition Toolbox software includes a block that can be used in Simulink tobring live video d

Página 166

9 Using the From Video Device Block in Simulink9-2Simulink Image Acquisition OverviewThe Image Acquisition Toolbox software includes a block that can

Página 167 - Specifying the Trigger Type

Opening the Image Acquisition Toolbox Block Library9-3Opening the Image Acquisition Toolbox Block LibraryIn this section...“Using the imaqlib Command

Página 168

Getting Started Doing Image Acquisition Programmatically1-9Step 1: Install Your Image Acquisition DeviceFollow the setup instructions that come with

Página 169

9 Using the From Video Device Block in Simulink9-4Using the Simulink Library BrowserTo open the Image Acquisition Toolbox block library, start the Sim

Página 170

Using Code Generation9-5Using Code GenerationThe From Video Device block supports the use of code generation. You can generatecode from the block. Th

Página 171

9 Using the From Video Device Block in Simulink9-6Saving Video Data to a FileIn this section...“Introduction” on page 9-6“Step 1: Open the Image Acqui

Página 172

Saving Video Data to a File9-7To create a new model, click the New model button on the Simulink Library Browsertoolbar. Simulink opens an empty model

Página 173

9 Using the From Video Device Block in Simulink9-8Drag From Video Device Block into ModelStep 4: Drag Other Blocks to Complete the ModelTo illustrate

Página 174

Saving Video Data to a File9-9Drag Output Block to ModelStep 5: Connect the BlocksConnect the three outputs from the From Video Device block to the t

Página 175

9 Using the From Video Device Block in Simulink9-10Note that your camera might have output ports that are Y, Cb, Cr and the input portson the To Multi

Página 176

Saving Video Data to a File9-11For example, using this dialog box, you can specify the device you want to use, select thevideo format you want to use

Página 177

9 Using the From Video Device Block in Simulink9-12While the simulation is running, the status bar at the bottom of the Simulink Editorindicates the p

Página 178

10Configuring GigE Vision Devices• “Types of Setups” on page 10-2• “Network Hardware Configuration Notes” on page 10-3• “Network Adaptor Configuration

Página 179

1 Getting Started1-10Device Information Descriptioncommunicate. See “Determining the Device ID” on page 1-10 formore information.Note: Specifying the

Página 180

10 Configuring GigE Vision Devices10-2Types of SetupsThe Image Acquisition Toolbox software supports GigE Vision devices. The followingsections descri

Página 181 - Executing Multiple Triggers

Network Hardware Configuration Notes10-3Network Hardware Configuration NotesThe following notes apply to network connections and hardware.Using the s

Página 182

10 Configuring GigE Vision Devices10-4Network Adaptor Configuration NotesIn this section...“Windows Configuration” on page 10-4“Linux Configuration” o

Página 183

Network Adaptor Configuration Notes10-5If the Status column says “Limited or no connectivity,” it will not impact yourcamera, as that status applies

Página 184

10 Configuring GigE Vision Devices10-6We recommend that you have your system administrator help with the following setuptasks:• Getting the Ethernet c

Página 185

Network Adaptor Configuration Notes10-7In the configuration shown here, the Mac Pro has two Ethernet connections, one to aninternal network, and one

Página 186 - Managing Memory Usage

10 Configuring GigE Vision Devices10-8The TCP/IP tab.

Página 187

Network Adaptor Configuration Notes10-9The DNS tab.

Página 188

10 Configuring GigE Vision Devices10-10The Ethernet tab.If you are using a MacBook, you may not have the option of Jumbo frames in the MTU.

Página 189

Software Configuration10-11Software ConfigurationYou need to have GenICam installed, but that is done for you by the Image AcquisitionToolbox. The ne

Página 190 - Logging Image Data to Disk

Getting Started Doing Image Acquisition Programmatically1-11in “Determining the Adaptor Name” on page 1-10.) In the data returned, theDeviceIDs field

Página 191

10 Configuring GigE Vision Devices10-12Note: You do not need to install GenICam to use the GigE adaptor, because it is nowincluded in the installation

Página 192

Setting Preferences10-13Setting PreferencesThere are three GigE Vision related preferences in the Image Acquisition Preferences. InMATLAB, on the Hom

Página 193 - Logging Image Data to Disk

10 Configuring GigE Vision Devices10-14Timeout for heartbeat – the camera requires that the application send a packet everyso often (like a heartbeat)

Página 194

Troubleshooting10-15TroubleshootingFor troubleshooting information for GigE Vision devices on Windows, see“Troubleshooting GigE Vision Devices on Win

Página 196

11Using the GigE Vision Interface• “GigE Vision Acquisition: gigecam Object vs. videoinput Object” on page 11-2• “Connect to GigE Vision Cameras” on p

Página 197

11 Using the GigE Vision Interface11-2GigE Vision Acquisition: gigecam Object vs. videoinput ObjectThe Image Acquisition Toolbox includes a separate i

Página 198

Connect to GigE Vision Cameras11-3Connect to GigE Vision CamerasUse the gigecamlist function to return the list of available GigE Vision Compliantcam

Página 199

11 Using the GigE Vision Interface11-4Set Properties for GigE AcquisitionIn this section...“Property Display” on page 11-4“Set GigE Properties” on pag

Página 200 - Image Acquisition Overview

Set Properties for GigE Acquisition11-5

Página 201 - Overview

1 Getting Started1-12 SupportedFormats: {'F7_Y8_1024x768' 'Y8_1024x768'}Step 3: Create a Video Input ObjectIn this step you

Página 202

11 Using the GigE Vision Interface11-6The list of available properties is specific to your camera. The display of propertiesis broken into categories

Página 203

Set Properties for GigE Acquisition11-7g = gigecam(1, 'ExposureTime', 20000, 'PixelFormat', 'Mono10')Set a Property Aft

Página 204

11 Using the GigE Vision Interface11-8Then use executeCommand to execute any of the commands found by the commandsfunction. The command name is passed

Página 205

Acquire Images from GigE Vision Cameras11-9Acquire Images from GigE Vision CamerasIn this section...“Create the gigecam Object” on page 11-9“Acquire

Página 206

11 Using the GigE Vision Interface11-10ans = Model Manufacturer IPAddress SerialNumber ____________________ _________

Página 207

Acquire Images from GigE Vision Cameras11-11 Model Manufacturer IPAddress SerialNumber ____________________ _________

Página 208

11 Using the GigE Vision Interface11-12ans = Model Manufacturer IPAddress SerialNumber ____________________ _________

Página 209 - Understanding Image Data

Acquire Images from GigE Vision Cameras11-13 Model Manufacturer IPAddress SerialNumber ____________________ _________

Página 210

11 Using the GigE Vision Interface11-14closePreview(g)7Acquire a single image from the camera using the snapshot function, and assign itto the variabl

Página 211

12Using the Kinect for WindowsAdaptor• “Important Information About the Kinect Adaptor” on page 12-2• “Data Streams Returned by the Kinect” on page 12

Página 212

Getting Started Doing Image Acquisition Programmatically1-13vidSummary of Video Input Object Using 'XCD-X700 1.05'. Acquisition Source(

Página 213

12 Using the Kinect for Windows Adaptor12-2Important Information About the Kinect AdaptorThe Kinect Adaptor lets you acquire images using a Kinect® fo

Página 214 - Specifying the Color Space

Important Information About the Kinect Adaptor12-3Kinect for Windows Sensor support package. See “Image Acquisition Support Packagesfor Hardware Adap

Página 215

12 Using the Kinect for Windows Adaptor12-4Data Streams Returned by the KinectThe Kinect for Windows device returns these data streams.• Image stream

Página 216

Data Streams Returned by the Kinect12-5Format DescriptionRawBayer_1280x960 Raw Bayer format. MONO8 frame typewith resolution of 1280 x 960, frame rat

Página 217

12 Using the Kinect for Windows Adaptor12-6Skeletal StreamThe skeletal stream returns skeletal data using the Kinect depth device. The skeletonframe r

Página 218

Detecting the Kinect Devices12-7Detecting the Kinect DevicesTypically in the Image Acquisition Toolbox, each camera or image device has oneDeviceID.

Página 219

12 Using the Kinect for Windows Adaptor12-8The following shows the depth sensor, which is Device 2.info.DeviceInfo(2)ans = DefaultFormat:

Página 220 - Viewing Acquired Data

Acquiring Image and Skeletal Data Using Kinect12-9Acquiring Image and Skeletal Data Using KinectIn “Detecting the Kinect Devices” on page 12-7, you c

Página 221 - Retrieving Timing Information

12 Using the Kinect for Windows Adaptor12-10 Saturation = 1 Sharpness = 0.5 WhiteBalance = 2700As you can see in the output, the

Página 222 - [data time] = getdata(vid);

Acquiring Image and Skeletal Data Using Kinect12-11Device-Specific Property – ColorSensorDescriptionAutoWhiteBalance Use to enable or disable automat

Página 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

Página 224

1 Getting Started1-14Video Preview WindowTo close the Video Preview window, click the Close button in the title bar or use theclosepreview function, s

Página 225

12 Using the Kinect for Windows Adaptor12-12Device-Specific Property – ColorSensorDescriptionCameraElevationAngle Controls the angle of the sensor len

Página 226

Acquiring Image and Skeletal Data Using Kinect12-13Device-Specific Property – ColorSensorDescriptionHue Indicates hue setting. Values must be in the

Página 227

12 Using the Kinect for Windows Adaptor12-14vid2 = videoinput('kinect',2,'Depth_640x480');6Look at the device-specific properties

Página 228

Acquiring Image and Skeletal Data Using Kinect12-15Device-Specific Property – DepthSensorDescription[0.06 -1.00 -0.09]represents values of x as 0.06

Página 229

12 Using the Kinect for Windows Adaptor12-16Device-Specific Property – DepthSensorDescriptionIREmitter Controls whether the IR emitter is on or off. V

Página 230 - 8 Using Events and Callbacks

Acquiring Image and Skeletal Data Using Kinect12-17start(vid2);8Skeletal data is accessed as metadata on the depth stream. You can use getdata toacce

Página 231 - Event Types

12 Using the Kinect for Windows Adaptor12-18MetaData Descriptionindicates the position is tracked and a 0indicates it is not.IsSkeletonTracked This is

Página 232

Acquiring Image and Skeletal Data Using Kinect12-19MetaData DescriptionJointWorldCoordinates This is a 20 x 3 x 6 double matrix of x-, y-and z-coordi

Página 233 - Event Types

12 Using the Kinect for Windows Adaptor12-20MetaData DescriptionSkeletonTrackingID This 1 x 6 integer matrix contains thetracking IDs of all six skele

Página 234 - Retrieving Event Information

Acquiring Image and Skeletal Data Using Kinect12-21 0.0301 -0.0125 2.2603 0.2364 0.2775 2.2117 0.3775 0.5872 2.2022 0.40

Página 235 - Retrieving Event Information

Getting Started Doing Image Acquisition Programmatically1-15• Describes the types of image acquisition objects used by the toolbox• Describes how to

Página 236

12 Using the Kinect for Windows Adaptor12-22BodyPosture Joint IndicesThe BodyPosture property, in step 5, indicates whether the tracked skeletons ares

Página 237

Acquiring from Color and Depth Devices Simultaneously12-23Acquiring from Color and Depth Devices SimultaneouslyYou can synchronize the data from the

Página 238

12 Using the Kinect for Windows Adaptor12-24Using Skeleton Viewer for Kinect Skeletal DataIf you do an acquisition with a Kinect for Windows and get s

Página 239

Using Skeleton Viewer for Kinect Skeletal Data12-25SkeletonConnectionMap = [[1 2]; % Spine [2 3]; [3

Página 240

12 Using the Kinect for Windows Adaptor12-26

Página 241

Installing the Kinect for Windows Sensor Support Package12-27Installing the Kinect for Windows Sensor Support PackageWith previous versions of the Im

Página 242

12 Using the Kinect for Windows Adaptor12-283On the Select support package to install screen, select Kinect for WindowsRuntime from the list.

Página 243 - Monitoring Memory Usage

Installing the Kinect for Windows Sensor Support Package12-29Accept or change the Installation folder and click Next.Note: You must have write privil

Página 244

12 Using the Kinect for Windows Adaptor12-30Review the information, including the license agreements, and click Next.6On the Confirm installation scre

Página 245

Installing the Kinect for Windows Sensor Support Package12-317Support Package Installer displays a progress bar while it downloads and installsthe Im

Página 246

1 Getting Started1-16 FramesAcquired = 0 FramesAvailable = 0 FramesPerTrigger = 10 Logging = off LoggingMode = memory Name = Y8_1024

Página 247 - Simulink

12 Using the Kinect for Windows Adaptor12-323Under the Security subsection, uncheck Check for publisher’s certificaterevocation to temporarily disable

Página 248

13Using the Matrox Interface• “Matrox Acquisition – matroxcam Object vs videoinput Object” on page 13-2• “Connect to Matrox Frame Grabbers” on page 13

Página 249 - Using the imaqlib Command

13 Using the Matrox Interface13-2Matrox Acquisition – matroxcam Object vs videoinput ObjectThe Image Acquisition Toolbox includes a separate interface

Página 250

Connect to Matrox Frame Grabbers13-3Connect to Matrox Frame GrabbersUse the matroxlist function to return the list of available Matrox frame grabbers

Página 251 - Using Code Generation

13 Using the Matrox Interface13-4Set Properties for Matrox AcquisitionYou cannot directly set properties for the matroxcam object in the Image Acquisi

Página 252 - Saving Video Data to a File

Set Properties for Matrox Acquisition13-54You can then preview and acquire images, as described in “Acquire Images fromMatrox Frame Grabbers” on page

Página 253 - Saving Video Data to a File

13 Using the Matrox Interface13-6Acquire Images from Matrox Frame GrabbersIn this section...“Create the matroxcam Object” on page 13-6“Acquire One Ima

Página 254

Acquire Images from Matrox Frame Grabbers13-7 Solios XCL (digitizer 0) Solios XCL (digitizer 1) VIO (digitizer 0)Create an object, m, using the

Página 255 - Step 5: Connect the Blocks

13 Using the Matrox Interface13-82Use the matroxcam function to create the object and connect it to the frame grabber.If you want to use the second fr

Página 256

14Using the VideoDevice System Object• “VideoDevice System Object Overview” on page 14-2• “Creating the VideoDevice System Object” on page 14-3• “Usin

Página 257 - Step 7: Run the Simulation

Getting Started Doing Image Acquisition Programmatically1-17 FrameRate = 15 Gain = 2048 Shutter = 2715Setting Object PropertiesTo set the va

Página 258

14 Using the VideoDevice System Object14-2VideoDevice System Object OverviewThe Image Acquisition Toolbox introduces the VideoDevice System object™, w

Página 259

Creating the VideoDevice System Object14-3Creating the VideoDevice System ObjectYou use the imaq.VideoDevice function to create the System object. Yo

Página 260 - Types of Setups

14 Using the VideoDevice System Object14-4Constructor Purposeinvalid property name or property value isspecified, the object is not created.Specifying

Página 261

Using VideoDevice System Object to Acquire Frames14-5Using VideoDevice System Object to Acquire FramesYou can use these functions with the VideoDevic

Página 262 - Windows Configuration

14 Using the VideoDevice System Object14-6Function Purposedetermined by the value of the VideoDevice System object ROIproperty. If not specified, it u

Página 263 - Linux Configuration

Using VideoDevice System Object to Acquire Frames14-75Acquire a single frame using the step function.frame = step(vidobj);6Display the acquired frame

Página 264 - Mac Configuration

14 Using the VideoDevice System Object14-8To create a System object using the Color sensor:vidobjcolor = imaq.VideoDevice('kinect', 1);To cr

Página 265

Using VideoDevice System Object to Acquire Frames14-9You can then look at both outputs. To see the image frame:imshow(imageData)To see the metadata o

Página 266 - The TCP/IP tab

14 Using the VideoDevice System Object14-10Using Properties on a VideoDevice System ObjectYou can specify properties at the time of object creation, o

Página 267 - The DNS tab

Using Properties on a VideoDevice System Object14-11Property Descriptionshows a device-specific property for VideoDevice Systemobject, obj.ROI Region

Página 268 - The Ethernet tab

1 Getting Started1-18• Starting the video input object — You start an object by calling the startfunction. Starting an object prepares the object for

Página 269 - Software Configuration

14 Using the VideoDevice System Object14-12Property DescriptionBayerSensorAlignment String indicating the 2x2 sensor alignment. SpecifiesBayer pattern

Página 270

Using Properties on a VideoDevice System Object14-13Note: This ROI value is 1-based. This differs from the videoinput object, the ImageAcquisition To

Página 271 - Setting Preferences

14 Using the VideoDevice System Object14-14Code Generation with VideoDevice System ObjectIn this section...“Using the codegen Function” on page 14-14“

Página 272

Code Generation with VideoDevice System Object14-15• Specific MathWorks shared libraries under [MATLABROOT]\bin\<ARCH>\• MathWorks adaptor libr

Página 273

14 Using the VideoDevice System Object14-16The only System object functions supported in code generation are:• get• getNumInputs• getNumOutputs• reset

Página 274

15Adding Support for AdditionalHardware

Página 275

15 Adding Support for Additional Hardware15-2Support for Additional HardwareThe Image Acquisition Toolbox software supports connections with hardware

Página 276

16TroubleshootingThis chapter provides information about solving common problems you might encounterwith the Image Acquisition Toolbox software and th

Página 277

16 Troubleshooting16-2Troubleshooting OverviewIf, after installing the Image Acquisition Toolbox software and using it to establish aconnection to you

Página 278 - Property Display

DALSA Coreco IFC Hardware16-3DALSA Coreco IFC HardwareIn this section...“Troubleshooting DALSA Coreco IFC Devices” on page 16-3“Determining the Drive

Página 279

Getting Started Doing Image Acquisition Programmatically1-19a difference image, and then displays it. Pixels that have changed values in the acquired

Página 280 - Set GigE Properties

16 Troubleshooting16-4• Verify that the version is compatible with the Image Acquisition Toolboxsoftware. For the correct driver information, check th

Página 281 - Use GigE Commands

DALSA Coreco Sapera Hardware16-5DALSA Coreco Sapera HardwareIn this section...“Troubleshooting DALSA Coreco Sapera Devices” on page 16-5“Determining

Página 282

16 Troubleshooting16-6• Find out the driver version you are using on your system. To learn how to getthis information, see “Determining the Driver Ver

Página 283 - Create the gigecam Object

Data Translation Hardware16-7Data Translation HardwareIf you are having trouble using the Image Acquisition Toolbox software with a supportedData Tra

Página 284

16 Troubleshooting16-8device driver installation. If you get error messages about missing files, insert theImaging Omni CD into your CD-ROM drive and

Página 285

DCAM IEEE 1394 (FireWire) Hardware on Windows16-9DCAM IEEE 1394 (FireWire) Hardware on WindowsIn this section...“Troubleshooting DCAM IEEE 1394 Hardw

Página 286

16 Troubleshooting16-10dcam or winvideo adaptors. If you can connect to your camera from the toolboxbut cannot access some camera features, such as ha

Página 287

DCAM IEEE 1394 (FireWire) Hardware on Windows16-11Note The CMU DCAM driver is the only DCAM driver supported by the toolbox.You cannot use vendor-sup

Página 288

16 Troubleshooting16-12You can use this demo application to verify whether your camera is using the CMUDCAM driver. The following describes the step-b

Página 289 - Using the Kinect for Windows

DCAM IEEE 1394 (FireWire) Hardware on Windows16-135Select Camera > Init Camera. In this step, the demo application checks the valuesof various cam

Página 290

1 Getting Started1-20Figure Window Displayed by ExampleImage Data in the MATLAB WorkspaceIn the example, the getdata function returns the image frames

Página 291

16 Troubleshooting16-147To exit, select Stop Camera from the Camera menu and then click Exit.

Página 292

Hamamatsu Hardware16-15Hamamatsu HardwareIf you are having trouble using the Image Acquisition Toolbox software with a xHamamatsu digital camera, fol

Página 293

16 Troubleshooting16-16Matrox HardwareIn this section...“Troubleshooting Matrox Devices” on page 16-16“Determining the Driver Version for Matrox Devic

Página 294

Matrox Hardware16-17Note: There is no difference between MIL and MIL-Lite software inside of MATLAB.They both work with Matrox Imaging devices.Determ

Página 295 - Detecting the Kinect Devices

16 Troubleshooting16-18QImaging HardwareIn this section...“Troubleshooting QImaging Devices” on page 16-18“Determining the Driver Version for QImaging

Página 296

QImaging Hardware16-19• Verify that the version is compatible with the Image Acquisition Toolboxsoftware. For the correct driver information, check t

Página 297

16 Troubleshooting16-20National Instruments HardwareIn this section...“Troubleshooting National Instruments Devices” on page 16-20“Determining the Dri

Página 298 - WhiteBalance = 2700

National Instruments Hardware16-21Note: The Image Acquisition Toolbox software is compatible only with specific driverversions provided with the Nati

Página 299

16 Troubleshooting16-22Point Grey HardwareIn this section...“Troubleshooting Point Grey Devices” on page 16-22“Determining the Driver Version for Poin

Página 300

Point Grey Hardware16-23Note: The Image Acquisition Toolbox software is compatible only with specific driverversions provided with the Point Grey sof

Página 301

Getting Started Doing Image Acquisition Programmatically1-21Step 7: Clean UpWhen you finish using your image acquisition objects, you can remove them

Página 302

16 Troubleshooting16-24Kinect for Windows HardwareThe Kinect adaptor is supported on 32-bit and 64-bit Windows.Note: The Kinect adaptor is intended fo

Página 303

Kinect for Windows Hardware16-25Troubleshooting the Support Package InstallationIf the setup fails, it could be caused by an internet security settin

Página 304

16 Troubleshooting16-26GigE Vision HardwareIn this section...“Troubleshooting GigE Vision Devices on Windows” on page 16-26“Troubleshooting GigE Visio

Página 305

GigE Vision Hardware16-27For more information on this, see Step 3 in “Installation of GigE Vision Cameras andDrivers on Windows” on page 10-4.5Make s

Página 306

16 Troubleshooting16-28http://www.mathworks.com/support/solutions/en/data/1-F36R0R/index.html8If you are able to start acquisition without error but d

Página 307

GigE Vision Hardware16-29Troubleshooting GigE Vision Devices on LinuxIf you are having trouble using the Image Acquisition Toolbox software with a Gi

Página 308

16 Troubleshooting16-30“Block 23 is being dropped because packets are unavailable for resend”and it does not mention buffer size, it is likely that pa

Página 309

GigE Vision Hardware16-31frames, you can check the metadata – if the first frame's block ID is not 1, you mayhave some missing frames. For examp

Página 310

16 Troubleshooting16-32For more information on this, see “Network Hardware Configuration Notes” on page10-3 and “Network Adaptor Configuration Notes”

Página 311

GigE Vision Hardware16-338If you receive an error that says a block or frame is being dropped because a packetis unavailable for resend, one likely c

Página 313

16 Troubleshooting16-34GenICam GenTL HardwareTroubleshooting GenICam GenTL HardwareIf you are having trouble using the Image Acquisition Toolbox softw

Página 314

GenICam GenTL Hardware16-35command and so sometimes after plugging in a new camera, it will not be found.Using the toolbox’s gige adaptor first can r

Página 315

16 Troubleshooting16-36Windows Video HardwareIn this section...“Troubleshooting Windows Video Devices” on page 16-36“Determining the Microsoft DirectX

Página 316 - Runtime from the list

Windows Video Hardware16-37• Verify that the version is compatible with the Image Acquisition Toolboxsoftware. For the correct driver information, ch

Página 317

16 Troubleshooting16-38In the DirectX Diagnostic Tool, the Microsoft DirectX version is listed on the System tabunder the System Information section.D

Página 318

Linux Video Hardware16-39Linux Video HardwareTroubleshooting Linux Video DevicesIf you have trouble using the Image Acquisition Toolbox software with

Página 319

16 Troubleshooting16-40on the Image Acquisition Toolbox product page at the MathWorks Web site(www.mathworks.com/products/imaq).4The Linux Video adapt

Página 320

Linux DCAM IEEE 1394 Hardware16-41Linux DCAM IEEE 1394 HardwareTroubleshooting Linux DCAM DevicesIf you are having trouble using the Image Acquisitio

Página 321

16 Troubleshooting16-42Macintosh Video HardwareTroubleshooting Macintosh Video DevicesIf you are having trouble using the Image Acquisition Toolbox so

Página 322 - 13 Using the Matrox Interface

Macintosh DCAM IEEE 1394 Hardware16-43Macintosh DCAM IEEE 1394 HardwareTroubleshooting Macintosh DCAM DevicesIf you are having trouble using the Imag

Página 323

2IntroductionThis chapter describes the Image Acquisition Toolbox software and its components.• “Toolbox Components Overview” on page 2-2• “Setting Up

Página 324

16 Troubleshooting16-44Video Preview Window TroubleshootingWhen previewing the video stream, if you encounter a problem, try one of the followingsolut

Página 325

Contacting MathWorks and Using the imaqsupport Function16-45Contacting MathWorks and Using the imaqsupport FunctionIf you need support from MathWorks

Página 327

17Functions — Alphabetical List

Página 328

17 Functions — Alphabetical List17-2clearClear image acquisition object from MATLAB workspaceSyntaxclear objDescriptionclear obj removes the image acq

Página 329

closepreview17-3closepreviewClose Video Preview windowSyntaxclosepreview(obj)closepreviewDescriptionclosepreview(obj) stops the image acquisition obj

Página 330

17 Functions — Alphabetical List17-4commandsList of commands available for GigE Vision cameraSyntaxcommands(g)Descriptioncommands(g) lists the availab

Página 331

commands17-5Get the list of supported commands from the camera. You can click Show Commands inthe property list that is displayed when you create the

Página 332

17 Functions — Alphabetical List17-6The list shows the commands that the camera supports. You can then use theexecuteCommand function to execute any o

Página 333 - L = isLocked(obj)

delete17-7deleteRemove image acquisition object from memorySyntaxdelete(obj)Descriptiondelete(obj) removes obj, an image acquisition object or array

Página 335 - Kinect for Windows Metadata

2 Introduction2-2Toolbox Components OverviewIn this section...“Introduction” on page 2-2“Toolbox Components” on page 2-3“The Image Processing Toolbox

Página 336

17 Functions — Alphabetical List17-8dispDisplay method for image acquisition objectsSyntaxobjdisp(obj)Descriptionobj displays summary information for

Página 337

disp17-9This example shows the summary information displayed for an array of video inputobjects.vid2 = videoinput('winvideo');[vid vid2]

Página 338 - <property_value>

17 Functions — Alphabetical List17-10executeCommandExecute command on GigE Vision cameraSyntaxexecuteCommand(g, 'commandname')Descriptionexe

Página 339

executeCommand17-11Get the list of supported commands from the camera. You can click Show Commands inthe property list that is displayed when you cre

Página 340

17 Functions — Alphabetical List17-12Execute a command, such as setting a calibration correction.executeCommand(g, 'Correction_CalibrateGrey&apos

Página 341

executeCommand17-13See Alsocommands | gigecam | gigecamlist | snapshot

Página 342 - Shared Library Dependencies

17 Functions — Alphabetical List17-14flushdataRemove data from memory buffer used to store acquired image framesSyntaxflushdata(obj)flushdata(obj,mode

Página 343

get17-15getReturn image acquisition object propertiesSyntaxget(obj)V = get(obj)V = get(obj,PropertyName)Descriptionget(obj) displays all property nam

Página 344

17 Functions — Alphabetical List17-16Instead of using get to query individual property values, you should use dot notation. Sofor example, instead of

Página 345 - Hardware

getdata17-17getdataAcquired image frames to MATLAB workspaceSyntaxdata = getdata(obj)data = getdata(obj,n)data = getdata(obj,n,type)data = getdata(ob

Página 346

Toolbox Components Overview2-3provides several ways to bring one or more frames of data into the workspace where youcan manipulate it as you would an

Página 347

17 Functions — Alphabetical List17-18data = getdata(obj,n,type) returns n frames of data associated with the videoinput object obj, where type is one

Página 348 - Troubleshooting Overview

getdata17-19information about the corresponding frame in data. The metadata structure containsthese fields:Metadata Field Description'AbsTime&ap

Página 349 - DALSA Coreco IFC Hardware

17 Functions — Alphabetical List17-20delete(obj);See Alsogetsnapshot | peekdata | propinfo | imaqhelp | imaqmontage

Página 350 - 16 Troubleshooting

getselectedsource17-21getselectedsourceReturn currently selected video source objectSyntaxsrc = getselectedsource(obj)Descriptionsrc = getselectedsou

Página 351 - DALSA Coreco Sapera Hardware

17 Functions — Alphabetical List17-22getsnapshotImmediately return single image frameSyntaxframe = getsnapshot(obj)[frame, metadata] = getsnapshot(obj

Página 352

getsnapshot17-23Note If obj is running but not logging, and has been configured with a hardware trigger,a timeout error will occur.To interrupt the g

Página 353 - Data Translation Hardware

17 Functions — Alphabetical List17-24gigecamCreate gigecam object to acquire images from GigE Vision camerasSyntaxg = gigecamg = gigecam('IPAddre

Página 354

gigecam17-25with no input argument, it creates the object and connects it to the first camera it findslisted in the output of the gigecamlist functio

Página 355

17 Functions — Alphabetical List17-26gigecamlistans = Model Manufacturer IPAddress SerialNumber ____________________

Página 356

gigecam17-27ans = Model Manufacturer IPAddress SerialNumber ____________________ ___________________ _____________

Página 357

2 Introduction2-4The Image Acquisition Toolbox Software ComponentsThe Image Processing Toolbox Software Required to Use the ImageAcquisition Toolbox S

Página 358

17 Functions — Alphabetical List17-28with that address. You can see the IP address for your camera in the list returned by thegigecamlist function.Exa

Página 359

gigecam17-29See Alsocommands | executeCommand | gigecamlist | snapshot

Página 360

17 Functions — Alphabetical List17-30gigecamlistList of GigE Vision cameras connected to your systemSyntaxgigecamlistDescriptiongigecamlist returns a

Página 361 - Hamamatsu Hardware

imaqfind17-31imaqfindFind image acquisition objectsSyntaximaqfindout = imaqfindout = imaqfind(PropertyName, Value, PropertyName2, Value2,...)out = im

Página 362 - Matrox Hardware

17 Functions — Alphabetical List17-32imaqfind does not find a match if you specify 'myobject'. Note, however, thatsearches for properties th

Página 363 - Matrox Hardware

imaqhelp17-33imaqhelpImage acquisition object function and property helpSyntaximaqhelpimaqhelp(Name)imaqhelp(obj)imaqhelp(obj,Name)out = imaqhelp(...

Página 364 - QImaging Hardware

17 Functions — Alphabetical List17-34imaqhelp('videoinput')out = imaqhelp('videoinput');imaqhelp getsnapshotimaqhelp LoggingModeGe

Página 365 - QImaging Hardware

imaqhwinfo17-35imaqhwinfoInformation about available image acquisition hardwareSyntaxout = imaqhwinfoout = imaqhwinfo(adaptorname)out = imaqhwinfo(ad

Página 366 - National Instruments Hardware

17 Functions — Alphabetical List17-36name, device name, video resolution, native data type, and device driver name andversion. If obj is an array of d

Página 367

imaqhwinfo17-37dev_info = imaqhwinfo('winvideo', 1)dev_info = DefaultFormat: 'RGB555_128x96' DeviceFileSupported: 0

Página 368 - Point Grey Hardware

Toolbox Components Overview2-5customers will need to purchase both products to use the Image Acquisition Toolboxproduct.If you have any questions, pl

Página 369 - Point Grey Hardware

17 Functions — Alphabetical List17-38imaqmemLimit memory or display memory usage for Image Acquisition Toolbox softwareSyntaxmem = imaqmemimaqmem(fiel

Página 370 - Kinect for Windows Hardware

imaqmem17-39Field DescriptionFrameMemoryUsed Number of bytes currently allocated by the Image AcquisitionToolbox software.imaqmem(field) returns info

Página 371 - Kinect for Windows Hardware

17 Functions — Alphabetical List17-40 TotalPhys: 263766016 AvailPhys: 37306368 TotalPageFile: 643878912 AvailPageFile:

Página 372 - GigE Vision Hardware

imaqmontage17-41imaqmontageSequence of image frames as montageSyntaximaqmontage(frames)imaqmontage(obj)imaqmontage(...,CLIM)imaqmontage(..., 'CL

Página 373 - GigE Vision Hardware

17 Functions — Alphabetical List17-42obj = videoinput('matrox', 1);Initiate an acquisition and access the logged data.start(obj);data = getd

Página 374

imaqreset17-43imaqresetDisconnect and delete all image acquisition objectsSyntaximaqresetDescriptionimaqreset deletes any image acquisition objects t

Página 375

17 Functions — Alphabetical List17-44imaqtoolLaunch Image Acquisition ToolSyntaximaqtoolimaqtool(file)Descriptionimaqtool launches an interactive GUI

Página 376

imaq.VideoDevice17-45imaq.VideoDeviceAcquire one frame at a time from video deviceSyntaxobj = imaq.VideoDeviceobj = imaq.VideoDevice(adaptorname)obj

Página 377 - [d t m]=getdata(vid,2);

17 Functions — Alphabetical List17-46video format supported by the device or a device configuration file (also known as acamera file).obj = imaq.Video

Página 378

imaq.VideoDevice17-47Property DescriptionDeviceFile Name of file specifying video format. This propertyis only visible when VideoFormat is set to &ap

Página 379

2 Introduction2-6Note: The toolbox supports only connections to IEEE 1394 (FireWire) DCAM-compliantdevices using the Carnegie Mellon University DCAM d

Página 380 - GenICam GenTL Hardware

17 Functions — Alphabetical List17-48Property DescriptionBayerSensorAlignment String indicating the 2x2 sensor alignment. SpecifiesBayer patterns retu

Página 381 - GenICam GenTL Hardware

imaq.VideoDevice17-49Function Purposerelease Release VideoDevice resources and allow property valuechanges.release(obj)releases system resources (suc

Página 382 - Windows Video Hardware

17 Functions — Alphabetical List17-50Function Purposeimaqhwinfo Returns information about the object.imaqhwinfo(obj)displays information about the Vid

Página 383 - Windows Video Hardware

islogging17-51isloggingDetermine whether video input object is loggingSyntaxbool = islogging(obj)Descriptionbool = islogging(obj) returns true if the

Página 384

17 Functions — Alphabetical List17-52 1Create a second video input object.vid2 = videoinput('winvideo');Start one of the video input objec

Página 385 - Linux Video Hardware

isrunning17-53isrunningDetermine whether video input object is runningSyntaxbool = isrunning(obj)Descriptionbool = isrunning(obj) returns true if the

Página 386

17 Functions — Alphabetical List17-54Use isrunning to determine which of the two objects is running.bool = isrunning([vid vid2])bool = 1 0See

Página 387 - Linux DCAM IEEE 1394 Hardware

isvalid17-55isvalidDetermine whether image acquisition object is associated with image acquisition deviceSyntaxbool = isvalid(obj)Descriptionbool = i

Página 388 - Macintosh Video Hardware

17 Functions — Alphabetical List17-56loadLoad image acquisition object into MATLAB workspaceSyntaxload filenameload filename obj1 obj2 ...S = load(fil

Página 389

matroxcam17-57matroxcamCreate matroxcam object to acquire images from Matrox frame grabbersSyntaxm = matroxcam(devicenumber, 'DCFfilename')

Página 390

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

Página 391

17 Functions — Alphabetical List17-58Create an object, m, using the index number. In this example, for the Solios XCL atdigitizer 1, use a 2 as the in

Página 392

matroxcam17-59Name of your DCF file, specified as a character string. The Digitizer Configuration File(DCF) is used to set acquisition properties and

Página 393

17 Functions — Alphabetical List17-60matroxlistList of Matrox frame grabbers connected to your systemSyntaxmatroxlistDescriptionmatroxlist returns a l

Página 394 - Description

matroxlist17-61See Alsoclosepreview | matroxcam | preview | snapshot

Página 395

17 Functions — Alphabetical List17-62obj2mfileConvert video input objects to MATLAB codeSyntaxobj2mfile(obj,filename)obj2mfile(obj,filename,syntax)obj

Página 396 - Examples

obj2mfile17-63obj2mfile(obj,filename,syntax) converts obj to the equivalent MATLAB codewhere syntax specifies how obj2mfile assigns values to propert

Página 397 - commands

17 Functions — Alphabetical List17-64ExamplesCreate a video input object. vidobj = videoinput('winvideo', 1, 'RGB24_640x480');Conf

Página 398 - See Also

peekdata17-65peekdataMost recently acquired image dataSyntaxdata = peekdata(obj,frames)Descriptiondata = peekdata(obj,frames) returns data containing

Página 399

17 Functions — Alphabetical List17-66The behavior of peekdata depends on the settings of the Running and the Loggingproperties.Running Logging Object

Página 400

preview17-67previewPreview of live video dataSyntaxpreview(obj)preview(obj,himage)himage = preview(...)Descriptionpreview(obj) creates a Video Previe

Página 401

2 Introduction2-8• Installing any software drivers required by the frame grabber. These are supplied bythe device vendor.• Connecting the camera, or o

Página 402

17 Functions — Alphabetical List17-68The Video Preview window remains active until it is either stopped using stoppreviewor closed using closepreview.

Página 403 - executeCommand

preview17-6914-, or 16-bit data. The Preview window display supports these higher bit-depth cameras.However, larger bit data is scaled to 8-bit for t

Página 404 - Input Arguments

17 Functions — Alphabetical List17-70The event structure contains the following fields:Field DescriptionData Current image frame specified as an H-by-

Página 405

propinfo17-71propinfoProperty characteristics for image acquisition objectsSyntaxout = propinfo(obj)out = propinfo(obj,PropertyName)Descriptionout =

Página 406

17 Functions — Alphabetical List17-72ExamplesCreate the video input object vid.vid = videoinput('winvideo',1);Capture all property informati

Página 407

save17-73saveSave image acquisition objects to MAT-fileSyntaxsave filenamesave filename obj1 obj2 ...save(filename,obj1,obj2,...)Descriptionsave file

Página 408

17 Functions — Alphabetical List17-74save fname objobj.TriggerFcn = {'mycallback', 5};save('fname1', 'obj')See Alsoimaqh

Página 409

set17-75setConfigure or display image acquisition object propertiesSyntaxset(obj)prop_struct = set(obj)set(obj,PropertyName)prop_cell = set(obj,Prope

Página 410

17 Functions — Alphabetical List17-76acquisition object obj. You can specify multiple property name/property value pairsin a single statement. obj can

Página 411

snapshot17-77snapshotAcquire single image frame from GigE Vision cameraSyntaximg = snapshot(g);Descriptionimg = snapshot(g); acquires the current fra

Página 412

Setting Up Image Acquisition Hardware2-930 frames per second (30 Hz). The CCIR and PAL standards define a frame rate of 25Hz. Nonstandard devices can

Página 413

17 Functions — Alphabetical List17-78 'MV1-D1312-80-G2-12' 'Photonofocus AG' '169.254.192.165' '02260001744

Página 414

snapshot17-79clear gSee Alsocommands | executeCommand | gigecam | gigecamlist

Página 415

17 Functions — Alphabetical List17-80snapshotAcquire single image frame from Matrox frame grabberSyntaximg = snapshot(m);[img, ts] = snapshot(m);Descr

Página 416

snapshot17-81 Solios XCL (digitizer 0) Solios XCL (digitizer 1) VIO (digitizer 0)Use the matroxcam function to create the object and connect it

Página 417

17 Functions — Alphabetical List17-82snapshot function as you normally would, as shown in this example, and then performthe hardware trigger to acquir

Página 418

start17-83startObtain exclusive use of image acquisition deviceSyntaxstart(obj)Descriptionstart(obj) obtains exclusive use of the image acquisition d

Página 419

17 Functions — Alphabetical List17-84An image acquisition object stops running when one of the following conditions is met:• The stop function is issu

Página 420 - More About

stop17-85stopStop video input objectSyntaxstop(obj)Descriptionstop(obj) halts an acquisition associated with the video input object obj. obj can beei

Página 421

17 Functions — Alphabetical List17-86obj.TimerFcn = {'stop'};See Alsoimaqfind | start | trigger | propinfo | videoinput

Página 422

stoppreview17-87stoppreviewStop previewing video dataSyntaxstoppreview(obj)Descriptionstoppreview(obj) stops the previewing of video data from image

Página 423

2 Introduction2-10Previewing DataIn this section...“Introduction” on page 2-10“Opening a Video Preview Window” on page 2-11“Stopping the Preview Video

Página 424

17 Functions — Alphabetical List17-88triggerInitiate data loggingSyntaxtrigger(obj)Descriptiontrigger(obj) initiates data logging for the video input

Página 425

triggerconfig17-89triggerconfigConfigure video input object trigger propertiesSyntaxtriggerconfig(obj,type)triggerconfig(obj,type,condition)triggerco

Página 426

17 Functions — Alphabetical List17-90names of config are TriggerType, TriggerCondition, and TriggerSource. Eachfield contains the current value of the

Página 427

triggerconfig17-91Pass one of the configurations to the triggerconfig function.triggerconfig(vid,config(2));Remove video input object from memory.del

Página 428

17 Functions — Alphabetical List17-92triggerinfoProvide information about available trigger configurationsSyntaxtriggerinfo(obj)triggerinfo(obj,type)c

Página 429

triggerinfo17-931Create a video input object.vid = videoinput('winvideo');2Get information about the available trigger configurations for t

Página 430

17 Functions — Alphabetical List17-94videoinputCreate video input objectSyntaxobj = videoinput(adaptorname)obj = videoinput(adaptorname,deviceID)obj =

Página 431

videoinput17-95obj = videoinput(adaptorname,deviceID,format,P1,V1,...) creates a videoinput object obj with the specified property values. If an inva

Página 432

17 Functions — Alphabetical List17-96More AboutTipsThe toolbox chooses the first available video source object as the selected source andspecifies thi

Página 433

wait17-97waitWait until image acquisition object stops running or loggingSyntaxwait(obj)wait(obj,waittime)wait(obj,waittime,state)Descriptionwait(obj

Página 434

Previewing Data2-11Preview window was designed to only show 8-bit data, but many cameras return 10-, 12-,14-, or 16-bit data. The Preview window disp

Página 435

17 Functions — Alphabetical List17-98An image acquisition object stops running or logging when one of the following conditionsis met:• The stop functi

Página 436

18Properties — Alphabetical List

Página 437

18 Properties — Alphabetical List18-2BayerSensorAlignmentSpecify sensor alignment for Bayer demosaicingDescriptionIf the ReturnedColorSpace property i

Página 438 - Properties

BayerSensorAlignment18-3The value of this property is only used if the ReturnedColorSpace property is set to'bayer'.For examples showing ho

Página 439 - imaq.VideoDevice

18 Properties — Alphabetical List18-4DeviceIDIdentify image acquisition device represented by video input objectDescriptionThe DeviceID property ident

Página 440 - Functions

DeviceID18-5 ToolboxName: 'Image Acquisition Toolbox' ToolboxVersion: '2.1 (R2007a)'Use the imaqhwinfo function ag

Página 441

18 Properties — Alphabetical List18-6DiskLoggerSpecify MATLAB VideoWriter file used to log dataDescriptionThe DiskLogger property specifies the VideoW

Página 442

DiskLogger18-7AVI FileA MATLAB AVI file object specifies the name and other characteristics of an AVI file.For example, you can use AVI file object p

Página 443

18 Properties — Alphabetical List18-8Using VideoWriterCreate a video input object that accesses a GigE Vision image acquisition device and usesgraysca

Página 444

DiskLogger18-9clear vidobjUsing an AVI FileCreate and configure an AVI file object.file = avifile('logfile.avi');file.Quality = 50;Create a

Página 445

vContentsGetting Started1Image Acquisition Toolbox Product Description . . . . . . . . . . 1-2Key Features . . . . . . . . . . . . . . . . . . . . . .

Página 446

2 Introduction2-12Note: The Image Acquisition Toolbox Preview window and the Preview window that isbuilt into the Image Acquisition Tool support the d

Página 447

18 Properties — Alphabetical List18-10Delete the image acquisition object from memory when it is no longer needed.delete(vid)clear vidSee AlsoFunction

Página 448

DiskLoggerFrameCount18-11DiskLoggerFrameCountSpecify number of frames written to diskDescriptionThe DiskLoggerFrameCount property indicates the curre

Página 449

18 Properties — Alphabetical List18-12ErrorFcnSpecify callback function to execute when run-time error occursDescriptionThe ErrorFcn property specifie

Página 450

EventLog18-13EventLogStore information about eventsDescriptionThe EventLog property is an array of structures that stores information about events.Ea

Página 451

18 Properties — Alphabetical List18-14CharacteristicsAccess Read onlyData type Structure arrayValues Default is empty structure array.ExamplesCreate a

Página 452

EventLog18-15See AlsoPropertiesLogging

Página 453

18 Properties — Alphabetical List18-16FrameGrabIntervalSpecify how often to acquire frame from video streamDescriptionThe FrameGrabInterval property s

Página 454

FrameGrabInterval18-17CharacteristicsAccess Read only while runningData type doubleValues Any positive integer. The default value is 1 (acquire every

Página 455 - obj2mfile

18 Properties — Alphabetical List18-18FramesAcquiredIndicate total number of frames acquiredDescriptionThe FramesAcquired property indicates the total

Página 456

FramesAcquiredFcn18-19FramesAcquiredFcnSpecify MATLAB file executed when specified number of frames have been acquiredDescriptionThe FramesAcquiredFc

Página 457

Previewing Data2-13The status displayed in the Video Preview window also changes to indicate thatpreviewing has been stopped.vid = videoinput('w

Página 458

18 Properties — Alphabetical List18-20FramesAcquiredFcnCountSpecify number of frames that must be acquired before frames acquired event isgeneratedDes

Página 459

FramesAvailable18-21FramesAvailableIndicate number of frames available in memory bufferDescriptionThe FramesAvailable property indicates the total nu

Página 460

18 Properties — Alphabetical List18-22FramesPerTriggerSpecify number of frames to acquire per trigger using selected video sourceDescriptionThe Frames

Página 461 - Custom Update Function

InitialTriggerTime18-23InitialTriggerTimeRecord absolute time of first triggerDescriptionThe InitialTriggerTime property records the absolute time of

Página 462

18 Properties — Alphabetical List18-24 1.0e+003 * 1.9990 0.0020 0.0190 0.0130 0.0260 0.0208Convert the clock vector into an inte

Página 463

Logging18-25LoggingIndicate whether object is currently logging dataDescriptionThe Logging property indicates whether the video input object is curre

Página 464

18 Properties — Alphabetical List18-26LoggingModeSpecify destination for acquired dataDescriptionThe LoggingMode property specifies where you want the

Página 465

LoggingMode18-27See AlsoFunctionsgetdataPropertiesDiskLogger, Logging

Página 466

18 Properties — Alphabetical List18-28NameSpecify name of image acquisition objectDescriptionThe Name property specifies a descriptive name for the im

Página 467

Name18-29PropertiesDeviceID, VideoFormat

Página 468

2 Introduction2-14The following example creates a figure window and then creates an image object in thefigure, the same size as the video frames. The

Página 469

18 Properties — Alphabetical List18-30NumberOfBandsIndicate number of color bands in data to be acquiredDescriptionThe NumberOfBands property indicate

Página 470

NumberOfBands18-31vid.NumberOfBandsans = 3If you retrieve the value of the VideoFormat property, you can see that the video data isin RGB format.

Página 471

18 Properties — Alphabetical List18-32ParentIdentify video input object that is parent of video source objectDescriptionThe Parent property identifies

Página 472

Previewing18-33PreviewingIndicate whether object is currently previewing data in separate windowDescriptionThe Previewing property indicates whether

Página 473

18 Properties — Alphabetical List18-34ReturnedColorSpaceSpecify color space used in MATLABDescriptionThe ReturnedColorSpace property specifies the col

Página 474

ReturnedColorSpace18-35For an example showing how to determine the default color space and change the colorspace setting, see “Specifying the Color S

Página 475

18 Properties — Alphabetical List18-36ROIPositionSpecify region-of-interest (ROI) windowDescriptionThe ROIPosition property specifies the region-of-in

Página 476

ROIPosition18-37Note: The Width does not include both end points as well as the width between thepixels. It includes one end point, plus the width be

Página 477

18 Properties — Alphabetical List18-38RunningIndicate whether video input object is ready to acquire dataDescriptionThe Running property indicates if

Página 478

Running18-39See AlsoPropertiesgetsnapshot, start, stopPropertiesLogging

Página 479

Previewing Data2-15Custom PreviewPerforming Custom Processing of Previewed DataWhen you specify an image object to the preview function (see “Preview

Página 480

18 Properties — Alphabetical List18-40SelectedIndicate whether video source object will be used for acquisitionDescriptionThe Selected property indica

Página 481

Selected18-41ans =input1Retrieve the currently selected video source object.src = getselectedsource(vid);View its Name and Selected properties.src.So

Página 482

18 Properties — Alphabetical List18-42SelectedSourceNameSpecify name of currently selected video sourceDescriptionThe SelectedSourceName property spec

Página 483

SelectedSourceName18-43See AlsoFunctionssetPropertiesSource

Página 484

18 Properties — Alphabetical List18-44SourceIndicate video source objects associated with video input objectDescriptionThe Source property is a vector

Página 485

Source18-45ExamplesCreate an image acquisition object.vid = videoinput('matrox');To access all the video source objects associated with a v

Página 486

18 Properties — Alphabetical List18-46SourceNameIndicate name of video source objectDescriptionThe SourceName property indicates the name of a video s

Página 487

StartFcn18-47StartFcnSpecify MATLAB file executed when start event occursDescriptionThe StartFcn property specifies the MATLAB file function to execu

Página 488

18 Properties — Alphabetical List18-48StopFcnSpecify MATLAB file executed when stop event occursDescriptionThe StopFcn property specifies the MATLAB f

Página 489

Tag18-49TagSpecify descriptive text to associate with image acquisition objectDescriptionThe Tag property specifies any descriptive text that you wan

Página 490

2 Introduction2-16Creating the Update Preview Window FunctionWhen preview calls the update preview window function you specify, it passes yourfunction

Página 491

18 Properties — Alphabetical List18-50TimeoutSpecify how long to wait for image dataDescriptionThe Timeout property specifies the amount of time (in s

Página 492 - BayerSensorAlignment

TimerFcn18-51TimerFcnSpecify MATLAB file callback function to execute when timer event occursDescriptionThe TimerFcn property specifies the MATLAB fi

Página 493 - Characteristics

18 Properties — Alphabetical List18-52TimerPeriodSpecify number of seconds between timer eventsDescriptionThe TimerPeriod property specifies the amoun

Página 494 - DeviceID

TriggerCondition18-53TriggerConditionIndicate required condition before trigger event occursDescriptionThe TriggerCondition property indicates the co

Página 495

18 Properties — Alphabetical List18-54PropertiesTriggerSource, TriggerType

Página 496 - DiskLogger

TriggerFcn18-55TriggerFcnSpecify MATLAB file callback function to execute when trigger event occursDescriptionThe TriggerFcn property specifies the M

Página 497

18 Properties — Alphabetical List18-56TriggerFrameDelaySpecify number of frames to skip before acquiring frames after trigger occursDescriptionThe Tri

Página 498

TriggerFrameDelay18-57See AlsoFunctionstriggerPropertiesFramesPerTrigger

Página 499

18 Properties — Alphabetical List18-58TriggerRepeatSpecify number of additional times to execute triggerDescriptionThe TriggerRepeat property specifie

Página 500

TriggerRepeat18-59PropertiesFramesPerTrigger, TriggersExecuted, TriggerType

Página 501 - DiskLoggerFrameCount

Previewing Data2-17ht = getappdata(himage,'HandleToTimestampLabel');% Set the value of the text label.ht.String = tstampstr;% Display image

Página 502 - ErrorFcn

18 Properties — Alphabetical List18-60TriggersExecutedIndicate total number of executed triggersDescriptionThe TriggersExecuted property indicates the

Página 503 - EventLog

TriggerSource18-61TriggerSourceIndicate hardware source to monitor for trigger conditionsDescriptionThe TriggerSource property indicates the hardware

Página 504

18 Properties — Alphabetical List18-62See AlsoFunctionstrigger, triggerconfig, triggerinfoPropertiesTriggerCondition, TriggerType

Página 505

TriggerType18-63TriggerTypeIndicate type of trigger used by video input objectDescriptionThe TriggerType property indicates the type of trigger used

Página 506 - FrameGrabInterval

18 Properties — Alphabetical List18-64See AlsoFunctionstrigger, triggerconfig, triggerinfoPropertiesTriggerCondition, TriggerSource

Página 507

Type18-65TypeIdentify type of image acquisition objectDescriptionThe Type property identifies the type of image acquisition object. An image acquisit

Página 508 - FramesAcquired

18 Properties — Alphabetical List18-66See AlsoFunctionsgetselectedsource, videoinput

Página 509 - FramesAcquiredFcn

UserData18-67UserDataStore data to associate with image acquisition objectDescriptionThe UserData property specifies any data that you want to associ

Página 510 - FramesAcquiredFcnCount

18 Properties — Alphabetical List18-68VideoFormatSpecify video format or name of device configuration fileDescriptionThe VideoFormat property specifie

Página 511 - FramesAvailable

VideoFormat18-69info = imaqhwinfo('winvideo')info = AdaptorDllName: [1x73 char] AdaptorDllVersion: '2.1 (R2007a)'

Página 512 - FramesPerTrigger

2 Introduction2-18 'Callback', 'stoppreview(vid)',... 'Units','normalized',... 'Position',[

Página 513 - InitialTriggerTime

18 Properties — Alphabetical List18-70VideoResolutionIndicate width and height of incoming video streamDescriptionThe VideoResolution property is a tw

Página 514

19Block Reference

Página 515

19 Block Reference19-2From Video DeviceAcquire live image data from image acquisition deviceLibraryImage Acquisition ToolboxDescriptionThe From Video

Página 516 - LoggingMode

From Video Device19-3The From Video Device block supports the use of model referencing. This feature letsyour model include other Simulink models as

Página 517

19 Block Reference19-4information for your models. One of the Build Information functions that Simulink Coderprovides is packNGo. This function allows

Página 518

From Video Device19-5

Página 519

19 Block Reference19-6The second diagram illustrates the options that may appear if your device supports usingeither one output port or multiple outpu

Página 520 - NumberOfBands

From Video Device19-7The image acquisition device to which you want to connect. The items in the list vary,depending on which devices you have connec

Página 521

19 Block Reference19-8and column are 0. The default values for height and width are set to the maximumallowable value, indicated by the video format&a

Página 522

From Video Device19-9Note: The block acquires data in the default ReturnedColorSpace setting for thespecified device and format.Data typeThe image da

Página 523 - Previewing

Previewing Data2-19Custom Preview GUI with Timestamp Text Label

Página 524 - ReturnedColorSpace

19 Block Reference19-10Kinect for Windows Metadata Output PortsThis is used to return skeleton information in Simulink during simulation and codegener

Página 525

From Video Device19-11This section is only visible when a Kinect Depth sensor is selected. The All Metadatalist shows which metadata are available. T

Página 526 - ROIPosition

19 Block Reference19-12buttons to change the order of items in the Selected list. The list supports multi-selectas well.You can see in the example abo

Página 527

Video Input (Obsolete)19-13Video Input (Obsolete)Connect to image acquisition deviceLibraryImage Acquisition ToolboxDescriptionThe Video Input block

Página 528

19 Block Reference19-14Dialog BoxDevice nameThe image acquisition device to which you want to connect. The items in the list vary,depending on which d

Página 530 - Selected

3Using the Image Acquisition Tool GUI• “The Image Acquisition Tool Desktop” on page 3-2• “Getting Started with the Image Acquisition Tool” on page 3-5

Página 531

vi ContentsToolbox Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3The Image Processing Toolbox Software Required to Use t

Página 532 - SelectedSourceName

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

Página 533

The Image Acquisition Tool Desktop3-3• Hardware Browser – Shows the image acquisition devices currently connectedto your system. Each device is a sep

Página 534

3 Using the Image Acquisition Tool GUI3-4MATLAB Workspace, VideoWriter, or to tools provided by the Image ProcessingToolbox software. See “Previewing

Página 535

Getting Started with the Image Acquisition Tool3-5Getting Started with the Image Acquisition ToolThis section describes an example of the basic work

Página 536 - SourceName

3 Using the Image Acquisition Tool GUI3-6and the Number of Triggers field on the Triggering tab. For example, if youset Frames Per Trigger to 4 and Nu

Página 537 - StartFcn

Getting Started with the Image Acquisition Tool3-7You can export the data that has been acquired in memory to a MAT-file, theMATLAB Workspace, VideoW

Página 538

3 Using the Image Acquisition Tool GUI3-8Selecting Your Device in Image Acquisition ToolIn this section...“Selecting a Device and Format” on page 3-8“

Página 539

Selecting Your Device in Image Acquisition Tool3-9Select the device format or camera file you want to use for the acquisition by clicking itsname in

Página 540

3 Using the Image Acquisition Tool GUI3-10Adding New HardwareWhen you open the Image Acquisition Tool, the Hardware Browser automaticallyshows the ima

Página 541 - TimerFcn

Setting Acquisition Parameters in Image Acquisition Tool3-11Setting Acquisition Parameters in Image Acquisition ToolIn this section...“Using the Acqu

Página 542 - TimerPeriod

viiSetting Device-Specific Parameters . . . . . . . . . . . . . . . . . . . 3-13Logging Your Data . . . . . . . . . . . . . . . . . . . . . . . . . .

Página 543 - TriggerCondition

3 Using the Image Acquisition Tool GUI3-12Note: Once you have changed parameters of a device, you can restore the device's defaultparameters by s

Página 544

Setting Acquisition Parameters in Image Acquisition Tool3-13Note that if you set Frames Per Trigger to infinite, you cannot set Number ofTriggers on

Página 545 - TriggerFcn

3 Using the Image Acquisition Tool GUI3-14The Selected source field specifies the name of the selected source for the currentdevice. Many device adapt

Página 546 - TriggerFrameDelay

Setting Acquisition Parameters in Image Acquisition Tool3-15To get help on any of the properties in the Device Properties tab, right-click a property

Página 547

3 Using the Image Acquisition Tool GUI3-16Logging Your DataSet logging options using the Logging tab. This determines where your data is logged towhen

Página 548 - TriggerRepeat

Setting Acquisition Parameters in Image Acquisition Tool3-17Memory LoggingIf you select Memory or Disk and memory in the Log to options, the Memory l

Página 549

3 Using the Image Acquisition Tool GUI3-18of five different cultures and save them for later analysis. The technician may wantresulting file names suc

Página 550 - TriggersExecuted

Setting Acquisition Parameters in Image Acquisition Tool3-19the compressed image. The data is compressed as much as possible, up to thespecified targ

Página 551 - TriggerSource

3 Using the Image Acquisition Tool GUI3-20Use the Triggering tab to set up triggering options.The total number of frames that will be acquired when yo

Página 552

Setting Acquisition Parameters in Image Acquisition Tool3-212Optionally set any acquisition parameters and stop the preview.3Select Manual in the Tri

Página 553 - TriggerType

viii ContentsConnecting to Hardware5Getting Hardware Information . . . . . . . . . . . . . . . . . . . . . . . . 5-2Getting Hardware Information . . .

Página 554

3 Using the Image Acquisition Tool GUI3-224Select your Trigger Source. This indicates the hardware source that is monitoredfor trigger conditions. Whe

Página 555

Setting Acquisition Parameters in Image Acquisition Tool3-23Use the arrows in each field to adjust the numbers. The preview resizes as you makechange

Página 556

3 Using the Image Acquisition Tool GUI3-24Your cursor becomes a selection tool.Note that the Select Region of Interest button is enabled only during p

Página 557 - UserData

Setting Acquisition Parameters in Image Acquisition Tool3-254Release the mouse button to freeze the region.The region is not set until you take actio

Página 558 - VideoFormat

3 Using the Image Acquisition Tool GUI3-26Before starting the acquisition, if you want to adjust the region further, you can dragthe selected region a

Página 559

Setting Acquisition Parameters in Image Acquisition Tool3-27You can clear the drawn region before you commit it by single-clicking anywhere inthe Pre

Página 560 - VideoResolution

3 Using the Image Acquisition Tool GUI3-28Previewing and Acquiring Data in Image Acquisition ToolIn this section...“The Preview Window” on page 3-28“P

Página 561

Previewing and Acquiring Data in Image Acquisition Tool3-29Use the buttons in the Preview window to:• Preview your image. See “Previewing Data” on pa

Página 562 - From Video Device

3 Using the Image Acquisition Tool GUI3-30Below the area that displays the frames you will see text messages with informationrelative to the current s

Página 563 - Code Generation

Previewing and Acquiring Data in Image Acquisition Tool3-31The nodes listed under the device name are the formats the device supports. Theymay corres

Página 564 - Dialog Box

ixData Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3Overview . . . . . . . . . . . . . . . . . . . . . .

Página 565 - From Video Device

3 Using the Image Acquisition Tool GUI3-32• If you set Trigger Type (on the Triggering tab) to Immediate, the tool willimmediately start logging data.

Página 566 - 19 Block Reference

Previewing and Acquiring Data in Image Acquisition Tool3-33If Images Are Blurry or DarkIf the first one or more frames of your acquisition are blurry

Página 567

3 Using the Image Acquisition Tool GUI3-34To use manual triggering, go to the Triggering tab of the Acquisition Parameterspane and select Manual in th

Página 568

Exporting Data in the Image Acquisition Tool3-35Exporting Data in the Image Acquisition ToolYou can export the data that has been acquired in memory

Página 569

3 Using the Image Acquisition Tool GUI3-36The VideoWriter Parameters dialog box opens after you select a file name and profileand click OK. If you sel

Página 570

Exporting Data in the Image Acquisition Tool3-37VideoWriter Options• Compression Ratio is a number greater than 1 that specifies the target ratiobetw

Página 571

3 Using the Image Acquisition Tool GUI3-38• Quality is a number from 0 to 100. Higher quality numbers result in highervideo quality and larger file si

Página 572

Saving Image Acquisition Tool Configurations3-39Saving Image Acquisition Tool ConfigurationsYou can save the configuration information about any of y

Página 573 - Video Input (Obsolete)

3 Using the Image Acquisition Tool GUI3-40You can then open the saved configuration file in a future tool session by selecting File >Open Configura

Página 574

Exporting Image Acquisition Tool Hardware Configurations to MATLAB3-41Exporting Image Acquisition Tool Hardware Configurations toMATLABYou can export

Comentários a estes Manuais

Sem comentários