MATLAB IMAGE ACQUISITION TOOLBOX - RELEASE NOTES Betriebsanweisung

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

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 574
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 0
Image Acquisition Toolbox™
User's Guide
R2015a
Seitenansicht 0
1 2 3 4 5 6 ... 573 574

Inhaltsverzeichnis

Seite 1 - User's Guide

Image Acquisition Toolbox™User's GuideR2015a

Seite 2 - How to Contact MathWorks

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

Seite 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

Seite 4

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

Seite 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

Seite 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

Seite 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

Seite 8

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

Seite 9

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

Seite 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

Seite 11

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

Seite 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

Seite 13 - Using the Matrox Interface

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

Seite 14 - Troubleshooting

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

Seite 15

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

Seite 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

Seite 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

Seite 18 - 1 Getting Started

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

Seite 19 - Product Overview

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

Seite 20

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

Seite 21 - Supported Hardware

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

Seite 23

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

Seite 24

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

Seite 25

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

Seite 26

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

Seite 27

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

Seite 28

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

Seite 29

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

Seite 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

Seite 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

Seite 32

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

Seite 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

Seite 34

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

Seite 35

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

Seite 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

Seite 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

Seite 38

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

Seite 39 - Introduction

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

Seite 40 - Toolbox Components Overview

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

Seite 41 - Toolbox Components

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

Seite 42 - 2 Introduction

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

Seite 43 - Supported Devices

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

Seite 44

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

Seite 45 - Setting Up Frame Grabbers

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

Seite 46

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

Seite 47

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

Seite 48 - Previewing Data

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

Seite 49 - Previewing Data

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

Seite 50

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

Seite 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

Seite 52

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

Seite 53

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

Seite 54

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

Seite 56

6Acquiring Image Data

Seite 57

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

Seite 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

Seite 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

Seite 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

Seite 61

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

Seite 62

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

Seite 63

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

Seite 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-

Seite 65

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

Seite 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

Seite 67

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

Seite 68 - Using a Camera File

xvi ContentsFunctions — Alphabetical List17Properties — Alphabetical List18Block Reference19

Seite 69

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

Seite 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

Seite 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

Seite 72

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

Seite 73

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

Seite 74 - Logging Your Data

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

Seite 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

Seite 76

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

Seite 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

Seite 78

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

Seite 79

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

Seite 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

Seite 81

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

Seite 82

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

Seite 83

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

Seite 84

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

Seite 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

Seite 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

Seite 87

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

Seite 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

Seite 89

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

Seite 90

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

Seite 91

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

Seite 92

Controlling Logging Parameters6-33Executing Multiple Triggers

Seite 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

Seite 94

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

Seite 95

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

Seite 96

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

Seite 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

Seite 98

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

Seite 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

Seite 100

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

Seite 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

Seite 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

Seite 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

Seite 104

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

Seite 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

Seite 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

Seite 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

Seite 108

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

Seite 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

Seite 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

Seite 112

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

Seite 113

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

Seite 114

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

Seite 115

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

Seite 116

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

Seite 117

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 124

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

Seite 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

Seite 126

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

Seite 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

Seite 128

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

Seite 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

Seite 130

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

Seite 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

Seite 132

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

Seite 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

Seite 134

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

Seite 135

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

Seite 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

Seite 137

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

Seite 138

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

Seite 139

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

Seite 140

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

Seite 141

Retrieving Timing Information7-27delete(vid)clear vid

Seite 143

8Using Events and Callbacks

Seite 144

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

Seite 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

Seite 146

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

Seite 147

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

Seite 148

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

Seite 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

Seite 150

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

Seite 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

Seite 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,

Seite 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

Seite 154

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

Seite 155

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

Seite 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

Seite 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

Seite 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

Seite 159 - Using a Manual Trigger

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

Seite 160

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

Seite 161

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

Seite 162

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

Seite 163

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

Seite 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

Seite 166

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

Seite 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

Seite 168

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

Seite 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

Seite 170

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 178

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

Seite 179

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

Seite 180

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

Seite 181 - Executing Multiple Triggers

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

Seite 182

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

Seite 183

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

Seite 184

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

Seite 185

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

Seite 186 - Managing Memory Usage

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

Seite 187

Network Adaptor Configuration Notes10-9The DNS tab.

Seite 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.

Seite 189

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

Seite 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

Seite 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

Seite 192

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

Seite 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)

Seite 194

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

Seite 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

Seite 197

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

Seite 198

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

Seite 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

Seite 200 - Image Acquisition Overview

Set Properties for GigE Acquisition11-5

Seite 201 - Overview

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

Seite 202

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

Seite 203

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

Seite 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

Seite 205

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

Seite 206

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

Seite 207

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

Seite 208

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

Seite 209 - Understanding Image Data

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

Seite 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

Seite 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

Seite 212

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

Seite 213

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

Seite 214 - Specifying the Color Space

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

Seite 215

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

Seite 216

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

Seite 217

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

Seite 218

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

Seite 219

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

Seite 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

Seite 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

Seite 222 - [data time] = getdata(vid);

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

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 Started1-14Video Preview WindowTo close the Video Preview window, click the Close button in the title bar or use theclosepreview function, s

Seite 225

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

Seite 226

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

Seite 227

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

Seite 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

Seite 229

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 236

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

Seite 237

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

Seite 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

Seite 239

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

Seite 240

12 Using the Kinect for Windows Adaptor12-26

Seite 241

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

Seite 242

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

Seite 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

Seite 244

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

Seite 245

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

Seite 246

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

Seite 247 - Simulink

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

Seite 248

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

Seite 249 - Using the imaqlib Command

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

Seite 250

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 256

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

Seite 257 - Step 7: Run the Simulation

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

Seite 258

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

Seite 259

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

Seite 260 - Types of Setups

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

Seite 261

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 267 - The DNS tab

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

Seite 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

Seite 269 - Software Configuration

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

Seite 270

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

Seite 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“

Seite 272

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

Seite 273

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

Seite 274

15Adding Support for AdditionalHardware

Seite 275

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

Seite 276

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

Seite 277

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

Seite 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

Seite 279

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

Seite 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

Seite 281 - Use GigE Commands

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

Seite 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

Seite 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

Seite 284

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

Seite 285

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 290

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

Seite 291

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

Seite 292

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

Seite 293

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

Seite 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

Seite 295 - Detecting the Kinect Devices

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

Seite 296

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

Seite 297

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

Seite 298 - WhiteBalance = 2700

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

Seite 299

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

Seite 300

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

Seite 301

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

Seite 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

Seite 303

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

Seite 304

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

Seite 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

Seite 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

Seite 307

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

Seite 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

Seite 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

Seite 310

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

Seite 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

Seite 313

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

Seite 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

Seite 315

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

Seite 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

Seite 317

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

Seite 318

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

Seite 319

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

Seite 320

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

Seite 321

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

Seite 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

Seite 323

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

Seite 324

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

Seite 325

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

Seite 327

17Functions — Alphabetical List

Seite 328

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

Seite 329

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

Seite 330

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

Seite 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

Seite 332

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

Seite 333 - L = isLocked(obj)

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

Seite 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

Seite 336

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

Seite 337

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

Seite 338 - <property_value>

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

Seite 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

Seite 340

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

Seite 341

executeCommand17-13See Alsocommands | gigecam | gigecamlist | snapshot

Seite 342 - Shared Library Dependencies

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

Seite 343

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

Seite 344

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

Seite 345 - Hardware

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

Seite 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

Seite 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

Seite 348 - Troubleshooting Overview

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

Seite 349 - DALSA Coreco IFC Hardware

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

Seite 350 - 16 Troubleshooting

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

Seite 351 - DALSA Coreco Sapera Hardware

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

Seite 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

Seite 353 - Data Translation Hardware

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

Seite 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

Seite 355

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

Seite 356

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

Seite 357

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

Seite 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

Seite 359

gigecam17-29See Alsocommands | executeCommand | gigecamlist | snapshot

Seite 360

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

Seite 361 - Hamamatsu Hardware

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

Seite 362 - Matrox Hardware

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

Seite 363 - Matrox Hardware

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

Seite 364 - QImaging Hardware

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

Seite 365 - QImaging Hardware

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

Seite 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

Seite 367

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

Seite 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

Seite 369 - Point Grey Hardware

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

Seite 370 - Kinect for Windows Hardware

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

Seite 371 - Kinect for Windows Hardware

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

Seite 372 - GigE Vision Hardware

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

Seite 373 - GigE Vision Hardware

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

Seite 374

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

Seite 375

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

Seite 376

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

Seite 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

Seite 378

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

Seite 379

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

Seite 380 - GenICam GenTL Hardware

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

Seite 381 - GenICam GenTL Hardware

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

Seite 382 - Windows Video Hardware

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

Seite 383 - Windows Video Hardware

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

Seite 384

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

Seite 385 - Linux Video Hardware

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

Seite 386

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

Seite 387 - Linux DCAM IEEE 1394 Hardware

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

Seite 388 - Macintosh Video Hardware

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

Seite 389

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

Seite 390

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

Seite 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

Seite 392

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

Seite 393

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

Seite 394 - Description

matroxlist17-61See Alsoclosepreview | matroxcam | preview | snapshot

Seite 395

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

Seite 396 - Examples

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

Seite 397 - commands

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

Seite 398 - See Also

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

Seite 399

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

Seite 400

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

Seite 401

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

Seite 402

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

Seite 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

Seite 404 - Input Arguments

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

Seite 405

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

Seite 406

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

Seite 407

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

Seite 408

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

Seite 409

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

Seite 410

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

Seite 411

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

Seite 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

Seite 413

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

Seite 414

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

Seite 415

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

Seite 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

Seite 417

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

Seite 418

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

Seite 419

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

Seite 420 - More About

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

Seite 421

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

Seite 422

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

Seite 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

Seite 424

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

Seite 425

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

Seite 426

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

Seite 427

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

Seite 428

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

Seite 429

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

Seite 430

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

Seite 431

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

Seite 432

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

Seite 433

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

Seite 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

Seite 435

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

Seite 436

18Properties — Alphabetical List

Seite 437

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

Seite 438 - Properties

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

Seite 439 - imaq.VideoDevice

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

Seite 440 - Functions

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

Seite 441

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

Seite 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

Seite 443

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

Seite 444

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

Seite 445

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

Seite 446

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

Seite 447

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

Seite 448

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

Seite 449

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

Seite 450

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

Seite 451

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

Seite 452

EventLog18-15See AlsoPropertiesLogging

Seite 453

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

Seite 454

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

Seite 455 - obj2mfile

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

Seite 456

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

Seite 457

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

Seite 458

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

Seite 459

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

Seite 460

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

Seite 461 - Custom Update Function

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

Seite 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

Seite 463

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

Seite 464

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

Seite 465

LoggingMode18-27See AlsoFunctionsgetdataPropertiesDiskLogger, Logging

Seite 466

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

Seite 467

Name18-29PropertiesDeviceID, VideoFormat

Seite 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

Seite 469

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

Seite 470

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

Seite 471

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

Seite 472

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

Seite 473

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

Seite 474

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

Seite 475

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

Seite 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

Seite 477

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

Seite 478

Running18-39See AlsoPropertiesgetsnapshot, start, stopPropertiesLogging

Seite 479

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

Seite 480

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

Seite 481

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

Seite 482

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

Seite 483

SelectedSourceName18-43See AlsoFunctionssetPropertiesSource

Seite 484

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

Seite 485

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

Seite 486

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

Seite 487

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

Seite 488

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

Seite 489

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

Seite 490

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

Seite 491

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

Seite 492 - BayerSensorAlignment

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

Seite 493 - Characteristics

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

Seite 494 - DeviceID

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

Seite 495

18 Properties — Alphabetical List18-54PropertiesTriggerSource, TriggerType

Seite 496 - DiskLogger

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

Seite 497

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

Seite 498

TriggerFrameDelay18-57See AlsoFunctionstriggerPropertiesFramesPerTrigger

Seite 499

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

Seite 500

TriggerRepeat18-59PropertiesFramesPerTrigger, TriggersExecuted, TriggerType

Seite 501 - DiskLoggerFrameCount

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

Seite 502 - ErrorFcn

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

Seite 503 - EventLog

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

Seite 504

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

Seite 505

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

Seite 506 - FrameGrabInterval

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

Seite 507

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

Seite 508 - FramesAcquired

18 Properties — Alphabetical List18-66See AlsoFunctionsgetselectedsource, videoinput

Seite 509 - FramesAcquiredFcn

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

Seite 510 - FramesAcquiredFcnCount

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

Seite 511 - FramesAvailable

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

Seite 512 - FramesPerTrigger

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

Seite 513 - InitialTriggerTime

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

Seite 514

19Block Reference

Seite 515

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

Seite 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

Seite 517

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

Seite 518

From Video Device19-5

Seite 519

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

Seite 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

Seite 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

Seite 522

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

Seite 523 - Previewing

Previewing Data2-19Custom Preview GUI with Timestamp Text Label

Seite 524 - ReturnedColorSpace

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

Seite 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

Seite 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

Seite 527

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

Seite 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

Seite 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

Seite 531

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

Seite 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

Seite 533

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

Seite 534

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

Seite 535

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

Seite 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

Seite 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

Seite 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“

Seite 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

Seite 540

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

Seite 541 - TimerFcn

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

Seite 542 - TimerPeriod

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

Seite 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

Seite 544

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 550 - TriggersExecuted

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

Seite 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

Seite 552

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

Seite 553 - TriggerType

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

Seite 554

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

Seite 555

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

Seite 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

Seite 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

Seite 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

Seite 559

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 564 - Dialog Box

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

Seite 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.

Seite 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

Seite 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

Seite 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

Seite 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

Seite 570

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

Seite 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

Seite 572

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

Seite 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

Seite 574

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

Kommentare zu diesen Handbüchern

Keine Kommentare