logo资料库

matlab(17)计算机视觉工具箱user-guide.pdf

第1页 / 共327页
第2页 / 共327页
第3页 / 共327页
第4页 / 共327页
第5页 / 共327页
第6页 / 共327页
第7页 / 共327页
第8页 / 共327页
资料共327页,剩余部分请下载后查看
toc
Input, Output, and Conversions
File Opening, Loading and Saving
Import from Video Files
Setting Block Parameters for this Example
Configuration Parameters
Export to Video Files
Setting Block Parameters for this Example
Configuration Parameters
Batch Process Image Files
Configuration Parameters
Display a Sequence of Images
Pre-loading Code
Configuration Parameters
Partition Video Frames to Multiple Image Files
Setting Block Parameters for this Example
Using the Enabled Subsystem Block
Configuration Parameters
Combine Video and Audio Streams into a Single Video File
Setting Up the Video Input Block
Setting Up the Audio Input Block
Setting Up the Output Block
Configuration Parameters
Import MATLAB Workspace Variables
Send or Receive Audio and Video Content Over a Network
Import a Live Video Stream
Colorspace Formatting and Conversions
Resample Image Chroma
Setting Block Parameters for This Example
Configuration Parameters
Convert Intensity to Binary Images
Thresholding Intensity Images Using Relational Operators
Thresholding Intensity Images Using the Autothreshold Block
Convert R'G'B' to Intensity Images
Process Multidimensional Color Video Signals
Data Formats
Video Formats
Defining Intensity and Color
Video Data Stored in Column-Major Format
Image Formats
Binary Images
Intensity Images
RGB Images
Display and Graphics
Display
View Streaming Video in MATLAB using Video Player and Deployable
Video Player System Object
Deployable Video Player System Object
Preview Video in MATLAB using MPlay Function
View Video in Simulink using the Video Viewer and To Video Displ
Video Viewer Block
To Video Display Block
View Video in Simulink using MPlay Function as a Floating Scope
MPlay
Toolbar Buttons
Playback Toolbar — Workspace and File Sources
Playback Toolbar — Simulink Sources
Configuration
Configuration Core Pane
Using the Keyboard commands respect playback modes
Configuration Sources Pane
Configuration Visuals Pane
Configuration Tools Pane
Video Information
Color Map for Intensity Video
Frame Rate
Saving the Settings of Multiple MPlay GUIs
Message Log
Status Bar
Graphics
Abandoned Object Detection
Initialize Required Variables and System Objects
Video Processing Loop
Annotate Video Files with Frame Numbers
Color Formatting
Inserting Text
Configuration Parameters
Registration and Stereo Vision
Feature Detection, Extraction, and Matching
Detect Edges in Images
Open the Simulink model
Setting block parameters
Setting configuration parameters
View edge detection results
Running the model faster
Close the model
Detect Lines in Images
Setting Block Parameters
Configuration Parameters
Detect Corner Features in an Image
Find Possible Point Matches Between Two Images
Measure an Angle Between Lines
Image Registration
Automatically Determine Geometric Transform for Image Registrati
Transform Images and Display Registration Results
Remove the Effect of Camera Motion from a Video Stream.
Stereo Vision
Compute Disparity Depth Map
Find Fundamental Matrix Describing Epipolar Geometry
Rectify Stereo Images
Motion Estimation and Tracking
Detect and Track Moving Objects Using Gaussian Mixture Models
Video Mosaicking
Track an Object Using Correlation
Create a Panoramic Scene
Geometric Transformations
Rotate an Image
Resize an Image
Crop an Image
Interpolation Methods
Nearest Neighbor Interpolation
Bilinear Interpolation
Bicubic Interpolation
Automatically Determine Geometric Transform for Image Registrati
Filters, Transforms, and Enhancements
Adjust the Contrast of Intensity Images
Adjust the Contrast of Color Images
Remove Periodic Noise from a Video
Remove Salt and Pepper Noise from Images
Sharpen an Image
Statistics and Morphological Operations
Find the Histogram of an Image
Correct Nonuniform Illumination
Count Objects in an Image
Fixed-Point Design
Fixed-Point Signal Processing
Fixed-Point Features
Benefits of Fixed-Point Hardware
Benefits of Fixed-Point Design with System Toolboxes Software
Fixed-Point Concepts and Terminology
Fixed-Point Data Types
Scaling
Precision and Range
Range
Precision
Arithmetic Operations
Modulo Arithmetic
Two's Complement
Addition and Subtraction
Multiplication
Multiplication Data Types
Casts
Casts to the Accumulator Data Type
Casts to the Intermediate Product or Product Output Data Type
Casts to the Output Data Type
Casting Examples
Cast from a Shorter Data Type to a Longer Data Type. Consider t
Cast from a Longer Data Type to a Shorter Data Type. Consider t
Fixed-Point Support for MATLAB System Objects
Getting Information About Fixed-Point System Objects
Fixed-Point Data Processing Support
Displaying Fixed-Point Properties
Setting System Object Fixed-Point Properties
Specify Fixed-Point Attributes for Blocks
Fixed-Point Block Parameters
Using the Data Type Assistant
Checking Signal Ranges
Specify System-Level Settings
Logging
Autoscaling
Data type override
Inherit via Internal Rule
Internal Rule for Accumulator Data Types
Internal Rule for Product Data Types
Internal Rule for Output Data Types
The Effect of the Hardware Implementation Pane on the Internal R
Internal Rule Examples
Select and Specify Data Types for Fixed-Point Blocks
Prepare the Model
Use Data Type Override to Find a Floating-Point Benchmark
Use the Fixed-Point Tool to Propose Fraction Lengths
Examine the Results and Accept the Proposed Scaling
Code Generation
Code Generation with System Objects
Functions that Generate Code
Shared Library Dependencies
Accelerating Simulink Models
Define New System Objects
Define Basic System Objects
Create the Class Definition File
Complete Class Definition File for Basic System Object
Change Number of Step Method Inputs or Outputs
Update the Algorithm for Multiple Inputs and Outputs
Update the Associated Methods
Complete Class Definition File with Multiple Inputs and Outputs
Validate Property and Input Values
Validate Properties
Validate Inputs
Complete Class Definition File with Property and Input Validatio
Initialize Properties and Setup One-Time Calculations
Define Properties to Initialize
Define Setup
Complete Class Definition File with Initialization and Setup
Set Property Values at Construction from Name-Value Pairs
Set Properties to Use Name-Value Pair Input
Complete Class Definition File with Constructor Setup
Reset Algorithm State
Reset Counter to Zero
Complete Class Definition File with State Reset
Define Property Attributes
Specify Property as Nontunable
Specify Property as Logical
Specify Property as Positive Integer
Specify Property as DiscreteState
Complete Class Definition File with Property Attributes
Hide Inactive Properties
Hide an inactive property
Complete Class Definition File with Hidden Inactive Property
Limit Property Values to a Finite Set of Strings
Specify a Set of Valid String Values
Complete Class Definition File with String Set
String Set System Object Example
Process Tuned Properties
Control When a Lookup Table Is Generated
Complete Class Definition File with Tuned Property Processing
Release System Object Resources
Release Memory by Clearing the Object
Complete Class Definition File with Released Resources
Define Composite System Objects
Store System Objects in Properties
Complete Class Definition File of Composite System Object
Class Definition File for FIR Component of Filter
Class Definition File for IIR Component of Filter
Define Finite Source Objects
Use the FiniteSource Class and Specify End of the Source
Complete Class Definition File with Finite Source
Methods Timing
Setup Method Call Sequence
Step Method Call Sequence
Reset Method Call Sequence
Release Method Call Sequence
Index
tables
Supported Computer Vision System Toolbox System Objects
Computer Vision System Toolbox™ User’s Guide R2012a
How to Contact MathWorks Web Newsgroup www.mathworks.com comp.soft-sys.matlab www.mathworks.com/contact_TS.html Technical Support suggest@mathworks.com bugs@mathworks.com doc@mathworks.com service@mathworks.com info@mathworks.com 508-647-7000 (Phone) Product enhancement suggestions Bug reports Documentation error reports Order status, license renewals, passcodes Sales, pricing, and general information 508-647-7001 (Fax) The MathWorks, Inc. 3 Apple Hill Drive Natick, MA 01760-2098 For contact information about worldwide offices, see the MathWorks Web site. Computer Vision System Toolbox™ User’s Guide © COPYRIGHT 2000–2012 by The MathWorks, Inc. The software described in this document is furnished under a license agreement. The software may be used or copied only under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form without prior written consent from The MathWorks, Inc. FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by, for, or through the federal government of the United States. By accepting delivery of the Program or Documentation, the government hereby agrees that this software or documentation qualifies as commercial computer software or commercial computer software documentation as such terms are used or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms and conditions of this Agreement and only those rights specified in this Agreement, shall pertain to and govern the use, modification, reproduction, release, performance, display, and disclosure of the Program and Documentation by the federal government (or other entity acquiring for or through the federal government) and shall supersede any conflicting contractual terms or conditions. If this License fails to meet the government’s needs or is inconsistent in any respect with federal procurement law, the government agrees to return the Program and Documentation, unused, to The MathWorks, Inc. Trademarks MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders. Patents MathWorks products are protected by one or more U.S. patents. Please see www.mathworks.com/patents for more information.
Revision History First printing July 2004 October 2004 Second printing March 2005 Online only September 2005 Online only November 2005 Online only March 2006 Online only September 2006 Online only Online only March 2007 September 2007 Online only March 2008 Online only October 2008 Online only March 2009 Online only September 2009 Online only Online only March 2010 September 2010 Online only April 2011 Online only September 2011 Online only Online only March 2012 New for Version 1.0 (Release 14) Revised for Version 1.0.1 (Release 14SP1) Revised for Version 1.1 (Release 14SP2) Revised for Version 1.2 (Release 14SP3) Revised for Version 2.0 (Release 14SP3+) Revised for Version 2.1 (Release 2006a) Revised for Version 2.2 (Release 2006b) Revised for Version 2.3 (Release 2007a) Revised for Version 2.4 (Release 2007b) Revised for Version 2.5 (Release 2008a) Revised for Version 2.6 (Release 2008b) Revised for Version 2.7 (Release 2009a) Revised for Version 2.8 (Release 2009b) Revised for Version 3.0 (Release 2010a) Revised for Version 3.1 (Release 2010b) Revised for Version 4.0 (Release 2011a) Revised for Version 4.1 (Release 2011b) Revised for Version 5.0 (Release 2012a)
1 2 Input, Output, and Conversions File Opening, Loading and Saving . . . . . . . . . . . . . . . . . . . Import from Video Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . Export to Video Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Batch Process Image Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Display a Sequence of Images Partition Video Frames to Multiple Image Files . . . . . . . . . Combine Video and Audio Streams into a Single Video File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Import MATLAB Workspace Variables . . . . . . . . . . . . . . . . Send or Receive Audio and Video Content Over a Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Import a Live Video Stream . . . . . . . . . . . . . . . . . . . . . . . . . Colorspace Formatting and Conversions . . . . . . . . . . . . . Resample Image Chroma . . . . . . . . . . . . . . . . . . . . . . . . . . . Convert Intensity to Binary Images . . . . . . . . . . . . . . . . . . . Convert R’G’B’ to Intensity Images . . . . . . . . . . . . . . . . . . . Process Multidimensional Color Video Signals . . . . . . . . . . Data Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Video Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Video Data Stored in Column-Major Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Image Formats 1-2 1-2 1-5 1-6 1-9 1-11 1-15 1-17 1-18 1-20 1-21 1-21 1-25 1-37 1-42 1-49 1-49 1-50 1-50 Display and Graphics Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . View Streaming Video in MATLAB using Video Player and . . . . . . . . . . . . Preview Video in MATLAB using MPlay Function . . . . . . . Deployable Video Player System Objects 2-2 2-2 2-2 Contents v
View Video in Simulink using the Video Viewer and To . . . . . . . . . . . . . . . . . . . . . . . . . . . . Video Display Blocks View Video in Simulink using MPlay Function as a Floating Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPlay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 2-4 2-7 Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Abandoned Object Detection . . . . . . . . . . . . . . . . . . . . . . . . Annotate Video Files with Frame Numbers . . . . . . . . . . . . 2-24 2-24 2-30 3 Registration and Stereo Vision Feature Detection, Extraction, and Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Detect Edges in Images Detect Lines in Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Detect Corner Features in an Image . . . . . . . . . . . . . . . . . . Find Possible Point Matches Between Two Images . . . . . . Measure an Angle Between Lines . . . . . . . . . . . . . . . . . . . . Image Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Automatically Determine Geometric Transform for Image Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Transform Images and Display Registration Results . . . . . Remove the Effect of Camera Motion from a Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Stream. Stereo Vision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Compute Disparity Depth Map . . . . . . . . . . . . . . . . . . . . . . Find Fundamental Matrix Describing Epipolar Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Rectify Stereo Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 3-2 3-8 3-11 3-12 3-14 3-26 3-26 3-27 3-28 3-29 3-29 3-30 3-32 vi Contents
4 5 6 Motion Estimation and Tracking Detect and Track Moving Objects Using Gaussian Mixture Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Video Mosaicking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Track an Object Using Correlation . . . . . . . . . . . . . . . . . . 4-2 4-3 4-4 Create a Panoramic Scene . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12 Geometric Transformations Rotate an Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 Resize an Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10 Crop an Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-16 Interpolation Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Nearest Neighbor Interpolation . . . . . . . . . . . . . . . . . . . . . . Bilinear Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bicubic Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Automatically Determine Geometric Transform for Image Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-22 5-22 5-23 5-24 5-26 Filters, Transforms, and Enhancements Adjust the Contrast of Intensity Images . . . . . . . . . . . . . 6-2 vii
7 8 Adjust the Contrast of Color Images . . . . . . . . . . . . . . . . . 6-8 Remove Periodic Noise from a Video . . . . . . . . . . . . . . . . 6-14 Remove Salt and Pepper Noise from Images . . . . . . . . . 6-23 Sharpen an Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-30 Statistics and Morphological Operations Find the Histogram of an Image . . . . . . . . . . . . . . . . . . . . . Correct Nonuniform Illumination . . . . . . . . . . . . . . . . . . . 7-2 7-9 Count Objects in an Image . . . . . . . . . . . . . . . . . . . . . . . . . 7-17 Fixed-Point Design Fixed-Point Signal Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fixed-Point Features Benefits of Fixed-Point Hardware . . . . . . . . . . . . . . . . . . . . Benefits of Fixed-Point Design with System Toolboxes Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fixed-Point Concepts and Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fixed-Point Data Types Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Precision and Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2 8-2 8-2 8-3 8-4 8-4 8-5 8-6 Arithmetic Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Modulo Arithmetic 8-10 8-10 viii Contents
分享到:
收藏