MATLAB IMAGE ACQUISITION TOOLBOX - RELEASE NOTES Uživatelská příručka

Procházejte online nebo si stáhněte Uživatelská příručka pro Software MATLAB IMAGE ACQUISITION TOOLBOX - RELEASE NOTES. MATLAB IMAGE ACQUISITION TOOLBOX - RELEASE NOTES User`s guide Uživatelská příručka

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 574
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 0
Image Acquisition Toolbox™
User's Guide
R2015a
Zobrazit stránku 0
1 2 3 4 5 6 ... 573 574

Shrnutí obsahu

Strany 1 - User's Guide

Image Acquisition Toolbox™User's GuideR2015a

Strany 2 - How to Contact MathWorks

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

Strany 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

Strany 4

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

Strany 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

Strany 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

Strany 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

Strany 8

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

Strany 9

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

Strany 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

Strany 11

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

Strany 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

Strany 13 - Using the Matrox Interface

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

Strany 14 - Troubleshooting

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

Strany 15

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

Strany 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

Strany 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

Strany 18 - 1 Getting Started

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

Strany 19 - Product Overview

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

Strany 20

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

Strany 21 - Supported Hardware

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

Strany 23

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

Strany 24

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

Strany 25

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

Strany 26

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

Strany 27

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

Strany 28

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

Strany 29

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

Strany 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

Strany 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

Strany 32

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

Strany 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

Strany 34

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

Strany 35

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

Strany 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

Strany 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

Strany 38

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

Strany 39 - Introduction

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

Strany 40 - Toolbox Components Overview

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

Strany 41 - Toolbox Components

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

Strany 42 - 2 Introduction

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

Strany 43 - Supported Devices

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

Strany 44

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

Strany 45 - Setting Up Frame Grabbers

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

Strany 46

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

Strany 47

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

Strany 48 - Previewing Data

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

Strany 49 - Previewing Data

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

Strany 50

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

Strany 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

Strany 52

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

Strany 53

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

Strany 54

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

Strany 56

6Acquiring Image Data

Strany 57

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

Strany 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

Strany 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

Strany 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

Strany 61

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

Strany 62

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

Strany 63

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

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

Strany 65

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

Strany 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

Strany 67

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

Strany 68 - Using a Camera File

xvi ContentsFunctions — Alphabetical List17Properties — Alphabetical List18Block Reference19

Strany 69

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

Strany 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

Strany 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

Strany 72

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

Strany 73

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

Strany 74 - Logging Your Data

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

Strany 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

Strany 76

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

Strany 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

Strany 78

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

Strany 79

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

Strany 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

Strany 81

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

Strany 82

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

Strany 83

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

Strany 84

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

Strany 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

Strany 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

Strany 87

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

Strany 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

Strany 89

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

Strany 90

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

Strany 91

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

Strany 92

Controlling Logging Parameters6-33Executing Multiple Triggers

Strany 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

Strany 94

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

Strany 95

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

Strany 96

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

Strany 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

Strany 98

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

Strany 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

Strany 100

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

Strany 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

Strany 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

Strany 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

Strany 104

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

Strany 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

Strany 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

Strany 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

Strany 108

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

Strany 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

Strany 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

Strany 112

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

Strany 113

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

Strany 114

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

Strany 115

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

Strany 116

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

Strany 117

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 124

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

Strany 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

Strany 126

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

Strany 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

Strany 128

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

Strany 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

Strany 130

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

Strany 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

Strany 132

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

Strany 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

Strany 134

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

Strany 135

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

Strany 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

Strany 137

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

Strany 138

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

Strany 139

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

Strany 140

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

Strany 141

Retrieving Timing Information7-27delete(vid)clear vid

Strany 143

8Using Events and Callbacks

Strany 144

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

Strany 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

Strany 146

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

Strany 147

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

Strany 148

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

Strany 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

Strany 150

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

Strany 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

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

Strany 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

Strany 154

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

Strany 155

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

Strany 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

Strany 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

Strany 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

Strany 159 - Using a Manual Trigger

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

Strany 160

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

Strany 161

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

Strany 162

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

Strany 163

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

Strany 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

Strany 166

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

Strany 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

Strany 168

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

Strany 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

Strany 170

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 178

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

Strany 179

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

Strany 180

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

Strany 181 - Executing Multiple Triggers

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

Strany 182

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

Strany 183

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

Strany 184

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

Strany 185

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

Strany 186 - Managing Memory Usage

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

Strany 187

Network Adaptor Configuration Notes10-9The DNS tab.

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

Strany 189

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

Strany 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

Strany 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

Strany 192

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

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

Strany 194

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

Strany 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

Strany 197

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

Strany 198

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

Strany 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

Strany 200 - Image Acquisition Overview

Set Properties for GigE Acquisition11-5

Strany 201 - Overview

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

Strany 202

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

Strany 203

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

Strany 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

Strany 205

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

Strany 206

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

Strany 207

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

Strany 208

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

Strany 209 - Understanding Image Data

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

Strany 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

Strany 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

Strany 212

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

Strany 213

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

Strany 214 - Specifying the Color Space

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

Strany 215

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

Strany 216

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

Strany 217

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

Strany 218

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

Strany 219

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

Strany 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

Strany 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

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

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

Strany 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

Strany 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

Strany 225

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

Strany 226

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

Strany 227

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

Strany 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

Strany 229

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 236

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

Strany 237

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

Strany 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

Strany 239

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

Strany 240

12 Using the Kinect for Windows Adaptor12-26

Strany 241

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

Strany 242

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

Strany 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

Strany 244

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

Strany 245

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

Strany 246

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

Strany 247 - Simulink

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

Strany 248

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

Strany 249 - Using the imaqlib Command

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

Strany 250

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 256

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

Strany 257 - Step 7: Run the Simulation

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

Strany 258

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

Strany 259

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

Strany 260 - Types of Setups

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

Strany 261

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 267 - The DNS tab

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

Strany 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

Strany 269 - Software Configuration

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

Strany 270

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

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

Strany 272

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

Strany 273

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

Strany 274

15Adding Support for AdditionalHardware

Strany 275

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

Strany 276

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

Strany 277

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

Strany 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

Strany 279

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

Strany 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

Strany 281 - Use GigE Commands

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

Strany 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

Strany 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

Strany 284

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

Strany 285

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 290

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

Strany 291

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

Strany 292

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

Strany 293

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

Strany 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

Strany 295 - Detecting the Kinect Devices

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

Strany 296

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

Strany 297

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

Strany 298 - WhiteBalance = 2700

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

Strany 299

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

Strany 300

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

Strany 301

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

Strany 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

Strany 303

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

Strany 304

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

Strany 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

Strany 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

Strany 307

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

Strany 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

Strany 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

Strany 310

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

Strany 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

Strany 313

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

Strany 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

Strany 315

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

Strany 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

Strany 317

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

Strany 318

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

Strany 319

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

Strany 320

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

Strany 321

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

Strany 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

Strany 323

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

Strany 324

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

Strany 325

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

Strany 327

17Functions — Alphabetical List

Strany 328

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

Strany 329

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

Strany 330

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

Strany 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

Strany 332

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

Strany 333 - L = isLocked(obj)

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

Strany 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

Strany 336

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

Strany 337

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

Strany 338 - <property_value>

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

Strany 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

Strany 340

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

Strany 341

executeCommand17-13See Alsocommands | gigecam | gigecamlist | snapshot

Strany 342 - Shared Library Dependencies

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

Strany 343

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

Strany 344

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

Strany 345 - Hardware

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

Strany 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

Strany 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

Strany 348 - Troubleshooting Overview

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

Strany 349 - DALSA Coreco IFC Hardware

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

Strany 350 - 16 Troubleshooting

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

Strany 351 - DALSA Coreco Sapera Hardware

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

Strany 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

Strany 353 - Data Translation Hardware

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

Strany 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

Strany 355

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

Strany 356

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

Strany 357

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

Strany 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

Strany 359

gigecam17-29See Alsocommands | executeCommand | gigecamlist | snapshot

Strany 360

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

Strany 361 - Hamamatsu Hardware

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

Strany 362 - Matrox Hardware

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

Strany 363 - Matrox Hardware

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

Strany 364 - QImaging Hardware

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

Strany 365 - QImaging Hardware

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

Strany 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

Strany 367

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

Strany 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

Strany 369 - Point Grey Hardware

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

Strany 370 - Kinect for Windows Hardware

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

Strany 371 - Kinect for Windows Hardware

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

Strany 372 - GigE Vision Hardware

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

Strany 373 - GigE Vision Hardware

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

Strany 374

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

Strany 375

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

Strany 376

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

Strany 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

Strany 378

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

Strany 379

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

Strany 380 - GenICam GenTL Hardware

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

Strany 381 - GenICam GenTL Hardware

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

Strany 382 - Windows Video Hardware

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

Strany 383 - Windows Video Hardware

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

Strany 384

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

Strany 385 - Linux Video Hardware

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

Strany 386

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

Strany 387 - Linux DCAM IEEE 1394 Hardware

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

Strany 388 - Macintosh Video Hardware

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

Strany 389

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

Strany 390

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

Strany 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

Strany 392

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

Strany 393

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

Strany 394 - Description

matroxlist17-61See Alsoclosepreview | matroxcam | preview | snapshot

Strany 395

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

Strany 396 - Examples

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

Strany 397 - commands

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

Strany 398 - See Also

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

Strany 399

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

Strany 400

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

Strany 401

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

Strany 402

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

Strany 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

Strany 404 - Input Arguments

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

Strany 405

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

Strany 406

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

Strany 407

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

Strany 408

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

Strany 409

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

Strany 410

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

Strany 411

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

Strany 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

Strany 413

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

Strany 414

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

Strany 415

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

Strany 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

Strany 417

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

Strany 418

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

Strany 419

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

Strany 420 - More About

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

Strany 421

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

Strany 422

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

Strany 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

Strany 424

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

Strany 425

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

Strany 426

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

Strany 427

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

Strany 428

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

Strany 429

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

Strany 430

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

Strany 431

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

Strany 432

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

Strany 433

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

Strany 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

Strany 435

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

Strany 436

18Properties — Alphabetical List

Strany 437

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

Strany 438 - Properties

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

Strany 439 - imaq.VideoDevice

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

Strany 440 - Functions

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

Strany 441

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

Strany 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

Strany 443

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

Strany 444

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

Strany 445

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

Strany 446

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

Strany 447

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

Strany 448

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

Strany 449

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

Strany 450

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

Strany 451

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

Strany 452

EventLog18-15See AlsoPropertiesLogging

Strany 453

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

Strany 454

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

Strany 455 - obj2mfile

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

Strany 456

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

Strany 457

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

Strany 458

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

Strany 459

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

Strany 460

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

Strany 461 - Custom Update Function

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

Strany 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

Strany 463

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

Strany 464

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

Strany 465

LoggingMode18-27See AlsoFunctionsgetdataPropertiesDiskLogger, Logging

Strany 466

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

Strany 467

Name18-29PropertiesDeviceID, VideoFormat

Strany 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

Strany 469

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

Strany 470

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

Strany 471

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

Strany 472

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

Strany 473

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

Strany 474

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

Strany 475

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

Strany 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

Strany 477

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

Strany 478

Running18-39See AlsoPropertiesgetsnapshot, start, stopPropertiesLogging

Strany 479

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

Strany 480

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

Strany 481

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

Strany 482

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

Strany 483

SelectedSourceName18-43See AlsoFunctionssetPropertiesSource

Strany 484

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

Strany 485

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

Strany 486

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

Strany 487

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

Strany 488

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

Strany 489

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

Strany 490

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

Strany 491

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

Strany 492 - BayerSensorAlignment

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

Strany 493 - Characteristics

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

Strany 494 - DeviceID

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

Strany 495

18 Properties — Alphabetical List18-54PropertiesTriggerSource, TriggerType

Strany 496 - DiskLogger

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

Strany 497

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

Strany 498

TriggerFrameDelay18-57See AlsoFunctionstriggerPropertiesFramesPerTrigger

Strany 499

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

Strany 500

TriggerRepeat18-59PropertiesFramesPerTrigger, TriggersExecuted, TriggerType

Strany 501 - DiskLoggerFrameCount

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

Strany 502 - ErrorFcn

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

Strany 503 - EventLog

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

Strany 504

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

Strany 505

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

Strany 506 - FrameGrabInterval

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

Strany 507

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

Strany 508 - FramesAcquired

18 Properties — Alphabetical List18-66See AlsoFunctionsgetselectedsource, videoinput

Strany 509 - FramesAcquiredFcn

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

Strany 510 - FramesAcquiredFcnCount

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

Strany 511 - FramesAvailable

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

Strany 512 - FramesPerTrigger

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

Strany 513 - InitialTriggerTime

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

Strany 514

19Block Reference

Strany 515

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

Strany 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

Strany 517

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

Strany 518

From Video Device19-5

Strany 519

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

Strany 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

Strany 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

Strany 522

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

Strany 523 - Previewing

Previewing Data2-19Custom Preview GUI with Timestamp Text Label

Strany 524 - ReturnedColorSpace

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

Strany 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

Strany 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

Strany 527

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

Strany 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

Strany 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

Strany 531

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

Strany 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

Strany 533

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

Strany 534

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

Strany 535

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

Strany 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

Strany 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

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

Strany 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

Strany 540

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

Strany 541 - TimerFcn

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

Strany 542 - TimerPeriod

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

Strany 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

Strany 544

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 550 - TriggersExecuted

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

Strany 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

Strany 552

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

Strany 553 - TriggerType

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

Strany 554

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

Strany 555

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

Strany 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

Strany 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

Strany 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

Strany 559

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 564 - Dialog Box

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

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 570

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

Strany 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

Strany 572

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

Strany 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

Strany 574

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

Komentáře k této Příručce

Žádné komentáře