Transcription
Computer Vision with MATLABMATLAB Expo 2012Steve Kuznicki 2011 The MathWorks, Inc.1
Today’s Topics IntroductionComputer Vision– Feature-based registration– Automatic image registration– Object recognition/Rotation correction with SURF andRANSAC– Face detection with Viola-Jones– Histogram-based tracking with CAMShift– Stereo image rectification Video processingSummary2
Computer VisionUsing images and video to detect, classify, and trackobjects or events in order to “understand” a real-worldsceneImageProcessingComputerVisionRemove noiseAdjust contrastMeasure DetectIdentifyClassifyRecognizeTrack InterpretationPedestrianBicyclistTruckCarTraffic violationAccident 3
Examples of Computer Vision with MATLAB4
Typical Computer Vision Challenges Variable lighting conditionsUnknown scene depth or perspectiveBackground clutterPartially hidden objects (occlusion)Differences in scale, location, and orientation5
Technical Computing with MATLABAccessExplore and DiscoverFilesData Analysisand ModelingSoftwareAlgorithmDevelopmentShareReporting andDocumentationOutputs for DesignCode and nt6
Key Products for Computer Vision Computer Vision System Toolbox - NEWImage Processing ToolboxMATLABStatistics Toolbox7
Computer Vision System ToolboxDesign and simulate computer visionand video processing systems Feature detectionFeature extraction and matchingFeature-based registrationStereo visionVideo processingMotion estimation and trackingVideo file I/O, display, and graphics8
Features are Critical to Computer Vision EdgeCornerTemplateSURFMSER9
Feature-Based Registration DemoWorkflow– Feature detection– Feature extraction– Feature matching– Geometric transformationestimation with RANSAC10
RANSAC Random Sample Consensus– Iterative estimation of parameters to a mathematical modelfrom a set of observed data that contains outliers Our uses of RANSAC– Estimate Geometric Transformation– Estimate Fundamental Matrix (useful for stereo vision)11
Rotation Correction with SURF DemoWorkflow– SURF Feature detection– SURF Descriptor extraction– Feature matching– Geometric transformationestimation with RANSAC12
Object Recognition with Features DemoWorkflow––––Use SURF features to represent objectDetect features in videoMatch features from two sourcesUse RANSAC to estimate object location13
Viola-Jones Face Detection DemoAlgorithm details– Haar wavelet features usingintegral image– Adaboost classifier forfeature selection– Cascading of classifiers toquickly weed out negativecandidates– Use several modes togetherto overcome false positives14
Histogram-based Tracking DemoWorkflow– Detect face and nose – get ROI– Use Hue channel from HSV space– Initialize histogram tracker– Reacquire face if track lost15
Stereo Image Rectification16
Recovering Scene Depth with Stereo Cameras17
Epipolar Geometry18
Fundamental MatrixTXL FXRDemo 019
20
22
Video Processing Video file I/O and displayVideo pre-processingMotion estimation and analysis23
Motion Estimation and Analysis Techniques– Block matching– Optical flow– Template matching– Background estimationusing Gaussian mixture models Applications Object tracking InterpolationCompression 24
Typical Parts of a Computer Vision Algorithm1.2.3.4.5.6.7.Image/video acquisitionImage/video pre-processingFeature detectionFeature extractionFeature matchingUsing features– Stabilization, mosaicking– Stereo image rectificationFeature classificationImage Acquisition ToolboxImage Processing ToolboxComputer VisionSystem ToolboxStatistics Toolbox25
Review: Key Products for Computer Visionwith MATLAB Computer Vision System ToolboxImage Processing ToolboxImage Acquisition ToolboxStatistics Toolbox26
Statistics ToolboxPerform statistical analysis, modeling,and algorithm development Clustering– Principle components analysis– K-means– Gaussian mixture models Classification– Naïve Bayes– K-nearest neighbor search– Boosted decision trees AdaBoost, GentleBoost, LogitBoost, 27
Why Use MATLAB for Computer Vision? Comprehensive environment– Analysis, algorithm development, visualization, etc. Broad library of algorithms– Computer vision– Image processing– Classification and clustering Documentation, examples, and technical supportIncreased productivity over C/C programming28
For More Information mathworks.com/products/computer-visionRelevant demos:– Barcode Recognition– Image Rectification– Traffic Warning Sign Recognition– People Tracking– Video Mosaicking DocumentationContact your sales representative29
Questions and Answers30
Why Use MATLAB for Computer Vision? Comprehensive environment – Analysis, algorithm development, visualization, etc. Broad library of algorithms – Computer vision – Image processing – Classification and clustering Documentation, examples, and technical support Incre