SlideShare uma empresa Scribd logo
1 de 14
Computer Vision – Intro
Images are taken from: Computer Vision : Algorithms and Applications / Richard Szeliski
Time line
Standard
Computer Vision
Tasks
Open CV
OpenCV (Open Source Computer Vision Library: http://opencv.org) is an open-
source BSD-licensed library that includes several hundreds of computer vision
algorithms.
Open CV – hard facts
• OpenCV is released under a BSD license
• Free for both academic and commercial use.
• C++, C, Python and Java interfaces.
• Supports Windows, Linux, Mac OS, iOS and Android.
• Written in optimized C/C++
• Ctake advantage of multi-core processing.
• Downloads exceeding 6 million.
• Latest version 2.4.6
Open CV – intro (1/2)
OpenCV has a modular structure, which means that the package includes
several shared or static libraries. The following modules are available:
core - a compact module defining basic data structures, including the dense
multi-dimensional array Mat and basic functions used by all other modules.
imgproc - an image processing module that includes linear and non-linear
image filtering, geometrical image transformations (resize, affine and
perspective warping, generic table-based remapping), color space conversion,
histograms, and so on.
video - a video analysis module that includes motion estimation, background
subtraction, and object tracking algorithms.
calib3d - basic multiple-view geometry algorithms, single and stereo camera
calibration, object pose estimation, stereo correspondence algorithms, and
elements of 3D reconstruction.
Open CV – intro (2/2)
features2d - salient feature detectors, descriptors, and descriptor matchers.
objdetect - detection of objects and instances of the predefined classes (for
example, faces, eyes, mugs, people, cars, and so on).
highgui - an easy-to-use interface to video capturing, image and video codecs,
as well as simple UI capabilities.
gpu - GPU-accelerated algorithms from different OpenCV modules.
... some other helper modules, such as FLANN and Google test wrappers,
Python bindings, and others.
http://docs.opencv.org/doc/tutorials/tutorials.html
Android programming - steps
Minimum skills:
Java for android / Objective C for iOS
openCV
C++ for native code
Minimum installation for android: (We will learn and apply later today)
Eclipse IDE
Android ADT
openCV
openCV C++/native
Simulator
Canny Edge Detector
• void Canny(InputArray image, OutputArray edges, double threshold1,
double threshold2, int apertureSize=3, bool L2gradient=false )
• Parameters:
image – single-channel 8-bit input image.
edges – output edge map; it has the same size and type as image .
threshold1 – first threshold for the hysteresis procedure.
threshold2 – second threshold for the hysteresis procedure.
apertureSize – aperture size for the Sobel() operator.
L2gradient – a flag, indicating whether a more accurate L_2 norm =sqrt{(dI/dx)^2 + (dI/dy)^2}
should be used to calculate the image gradient magnitude ( L2gradient=true ), or whether the
default L_1 norm =|dI/dx|+|dI/dy| is enough ( L2gradient=false ).
Canny Edge Detector - code
Mat src, src_gray;
Mat dst, detected_edges;
int edgeThresh = 1;
int lowThreshold = 1;
int const max_lowThreshold = 100;
int kernel_size = 3;
char* window_name = "Edge Map";
/// Reduce noise with a kernel 3x3. Assume src_gray is already read
blur( src_gray, detected_edges, Size(3,3) );
/// Canny detector
Canny( detected_edges, detected_edges, lowThreshold, lowThreshold, kernel_size );
/// Using Canny's output as a mask, we display our result
dst = Scalar::all(0);
src.copyTo( dst, detected_edges);
imshow( window_name, dst );
Hough Transform
• void HoughLines(InputArray image, OutputArray lines, double rho, double theta,
Int threshold, double srn=0, double stn=0 )
• Parameters:
image – 8-bit, single-channel binary source image.
lines – Output vector of lines
rho – Distance resolution of the accumulator in pixels.
theta – Angle resolution of the accumulator in radians.
threshold – Accumulator threshold parameter.
srn – For the multi-scale Hough transform, it is a divisor for the distance
resolution rho.
stn – For the multi-scale Hough transform, it is a divisor for the distance
resolution theta.
Hough Transform - code
Mat dst, cdst;
Canny(src, dst, 50, 200, 3);
cvtColor(dst, cdst, CV_GRAY2BGR);
vector<Vec2f> lines;
HoughLines(dst, lines, 1, CV_PI/180, 100, 0, 0 );
// Draw the lines
for( size_t i = 0; i < lines.size(); i++ )
{
float rho = lines[i][0], theta = lines[i][1];
Point pt1, pt2;
double a = cos(theta), b = sin(theta);
double x0 = a*rho, y0 = b*rho;
pt1.x = cvRound(x0 + 1000*(-b));
pt1.y = cvRound(y0 + 1000*(a));
pt2.x = cvRound(x0 - 1000*(-b));
pt2.y = cvRound(y0 - 1000*(a));
line( cdst, pt1, pt2, Scalar(0,0,255), 3, CV_AA);
}
Cascade classifier
• void CascadeClassifier::detectMultiScale(const Mat& image, vector<Rect>& objects, double
scaleFactor=1.1, int minNeighbors=3, int flags=0, Size minSize=Size(), Size maxSize=Size())
• Parameters:
cascade – Haar classifier cascade (OpenCV 1.x API only). It can be loaded from
XML or YAML file using Load().
image – Matrix of the type CV_8U containing an image where objects are
detected.
objects – Vector of rectangles where each rectangle contains the detected
object.
scaleFactor – Parameter specifying how much the image size is reduced at each
image scale.
minNeighbors – Parameter specifying how many neighbors each candidate
rectangle should have to retain it.
flags – Parameter with the same meaning for an old cascade as in the function
cvHaarDetectObjects. It is not used for a new cascade.
minSize – Minimum possible object size. Objects smaller than that are ignored.
maxSize – Maximum possible object size. Objects larger than that are ignored.
Cascade classifier - codeString face_cascade_name = "haarcascade_frontalface_alt.xml";
CascadeClassifier face_cascade;
// load cascade
face_cascade.load( face_cascade_name ) ;
eyes_cascade.load( eyes_cascade_name );
Mat frame_gray;
cvtColor( frame, frame_gray, CV_BGR2GRAY );
equalizeHist( frame_gray, frame_gray );
// Detect faces
face_cascade.detectMultiScale( frame_gray, faces, 1.1, 2,0|CV_HAAR_SCALE_IMAGE, Size(30, 30) );
// Draw ellipses
for( int i = 0; i < faces.size(); i++ )
{
Point center( faces[i].x + faces[i].width*0.5, faces[i].y + faces[i].height*0.5 );
ellipse( frame, center, Size( faces[i].width*0.5, faces[i].height*0.5), 0, 0, 360, Scalar( 255, 0, 255 ), 4, 8, 0 );
}

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Object tracking presentation
Object tracking  presentationObject tracking  presentation
Object tracking presentation
 
Object detection with deep learning
Object detection with deep learningObject detection with deep learning
Object detection with deep learning
 
Erosion and dilation
Erosion and dilationErosion and dilation
Erosion and dilation
 
Edge detection
Edge detectionEdge detection
Edge detection
 
Image segmentation
Image segmentation Image segmentation
Image segmentation
 
Chapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woodsChapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woods
 
Object Recognition
Object RecognitionObject Recognition
Object Recognition
 
Computer vision introduction
Computer vision  introduction Computer vision  introduction
Computer vision introduction
 
Computer vision
Computer visionComputer vision
Computer vision
 
Image recognition
Image recognitionImage recognition
Image recognition
 
Computer Vision
Computer VisionComputer Vision
Computer Vision
 
Object detection
Object detectionObject detection
Object detection
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)
 
Image proccessing and its application
Image proccessing and its applicationImage proccessing and its application
Image proccessing and its application
 
Object detection presentation
Object detection presentationObject detection presentation
Object detection presentation
 
Computer vision
Computer visionComputer vision
Computer vision
 
What is computer vision?
What is computer vision?What is computer vision?
What is computer vision?
 
Convolutional Neural Networks
Convolutional Neural NetworksConvolutional Neural Networks
Convolutional Neural Networks
 
Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)
 
Computer Vision
Computer VisionComputer Vision
Computer Vision
 

Destaque

An Introduction to Computer Vision
An Introduction to Computer VisionAn Introduction to Computer Vision
An Introduction to Computer Visionguestd1b1b5
 
Computer Vision Basics
Computer Vision BasicsComputer Vision Basics
Computer Vision BasicsSuren Kumar
 
How Computer Vision is Reshaping Real Estate Search - Andrew Flachner
How Computer Vision is Reshaping Real Estate Search - Andrew FlachnerHow Computer Vision is Reshaping Real Estate Search - Andrew Flachner
How Computer Vision is Reshaping Real Estate Search - Andrew FlachnerInman News
 
Cross platform computer vision optimization
Cross platform computer vision optimizationCross platform computer vision optimization
Cross platform computer vision optimizationYoss Cohen
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image ProcessingSahil Biswas
 
General introduction to computer vision
General introduction to computer visionGeneral introduction to computer vision
General introduction to computer visionbutest
 
Computer vision, machine, and deep learning
Computer vision, machine, and deep learningComputer vision, machine, and deep learning
Computer vision, machine, and deep learningIgi Ardiyanto
 
Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)Luigi De Russis
 
Python in Computer Vision
Python in Computer VisionPython in Computer Vision
Python in Computer VisionBrian Thorne
 
Introduction to digital image processing
Introduction to digital image processingIntroduction to digital image processing
Introduction to digital image processingHossain Md Shakhawat
 
Image Processing
Image ProcessingImage Processing
Image ProcessingRolando
 
Image Search Engine Frequently Asked Questions
Image Search Engine Frequently Asked QuestionsImage Search Engine Frequently Asked Questions
Image Search Engine Frequently Asked Questionsakvalex
 
20110220 computer vision_eruhimov_lecture01
20110220 computer vision_eruhimov_lecture0120110220 computer vision_eruhimov_lecture01
20110220 computer vision_eruhimov_lecture01Computer Science Club
 

Destaque (20)

Computer Vision
Computer VisionComputer Vision
Computer Vision
 
An Introduction to Computer Vision
An Introduction to Computer VisionAn Introduction to Computer Vision
An Introduction to Computer Vision
 
Computer Vision Crash Course
Computer Vision Crash CourseComputer Vision Crash Course
Computer Vision Crash Course
 
Computer Vision Basics
Computer Vision BasicsComputer Vision Basics
Computer Vision Basics
 
How Computer Vision is Reshaping Real Estate Search - Andrew Flachner
How Computer Vision is Reshaping Real Estate Search - Andrew FlachnerHow Computer Vision is Reshaping Real Estate Search - Andrew Flachner
How Computer Vision is Reshaping Real Estate Search - Andrew Flachner
 
Cross platform computer vision optimization
Cross platform computer vision optimizationCross platform computer vision optimization
Cross platform computer vision optimization
 
Image processing ppt
Image processing pptImage processing ppt
Image processing ppt
 
Computer vision
Computer visionComputer vision
Computer vision
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
General introduction to computer vision
General introduction to computer visionGeneral introduction to computer vision
General introduction to computer vision
 
Computer vision, machine, and deep learning
Computer vision, machine, and deep learningComputer vision, machine, and deep learning
Computer vision, machine, and deep learning
 
Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)
 
OpenCV Introduction
OpenCV IntroductionOpenCV Introduction
OpenCV Introduction
 
Python in Computer Vision
Python in Computer VisionPython in Computer Vision
Python in Computer Vision
 
Introduction to digital image processing
Introduction to digital image processingIntroduction to digital image processing
Introduction to digital image processing
 
Image Processing
Image ProcessingImage Processing
Image Processing
 
Image Search Engine Frequently Asked Questions
Image Search Engine Frequently Asked QuestionsImage Search Engine Frequently Asked Questions
Image Search Engine Frequently Asked Questions
 
Image search engine
Image search engineImage search engine
Image search engine
 
20110220 computer vision_eruhimov_lecture01
20110220 computer vision_eruhimov_lecture0120110220 computer vision_eruhimov_lecture01
20110220 computer vision_eruhimov_lecture01
 
UnityでAR
UnityでARUnityでAR
UnityでAR
 

Semelhante a Computer Vision Introduction

Intro_OpenCV.ppt
Intro_OpenCV.pptIntro_OpenCV.ppt
Intro_OpenCV.pptRithikRaj25
 
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres..."The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...Edge AI and Vision Alliance
 
OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012Wingston
 
Presentation1.2.pptx
Presentation1.2.pptxPresentation1.2.pptx
Presentation1.2.pptxpranaykusuma
 
Computer Vision Landscape : Present and Future
Computer Vision Landscape : Present and FutureComputer Vision Landscape : Present and Future
Computer Vision Landscape : Present and FutureSanghamitra Deb
 
Marek Suplata Projects
Marek Suplata ProjectsMarek Suplata Projects
Marek Suplata Projectsguest14f12f
 
Eclipse Con Europe 2014 How to use DAWN Science Project
Eclipse Con Europe 2014 How to use DAWN Science ProjectEclipse Con Europe 2014 How to use DAWN Science Project
Eclipse Con Europe 2014 How to use DAWN Science ProjectMatthew Gerring
 
01 foundations
01 foundations01 foundations
01 foundationsankit_ppt
 
Rapid object detection using boosted cascade of simple features
Rapid object detection using boosted  cascade of simple featuresRapid object detection using boosted  cascade of simple features
Rapid object detection using boosted cascade of simple featuresHirantha Pradeep
 
Linux and Open Source in Math, Science and Engineering
Linux and Open Source in Math, Science and EngineeringLinux and Open Source in Math, Science and Engineering
Linux and Open Source in Math, Science and EngineeringPDE1D
 
Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCVAutomatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCVEditor IJCATR
 
Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCV Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCV Editor IJCATR
 
Новый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоныНовый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоныTimur Safin
 
Vision based system for monitoring the loss of attention in automotive driver
Vision based system for monitoring the loss of attention in automotive driverVision based system for monitoring the loss of attention in automotive driver
Vision based system for monitoring the loss of attention in automotive driverVinay Diddi
 
Sem 2 Presentation
Sem 2 PresentationSem 2 Presentation
Sem 2 PresentationShalom Cohen
 
Creating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector GraphicsCreating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector GraphicsDavid Keener
 
Text Detection and Recognition in Natural Images
Text Detection and Recognition in Natural ImagesText Detection and Recognition in Natural Images
Text Detection and Recognition in Natural ImagesIRJET Journal
 

Semelhante a Computer Vision Introduction (20)

Intro_OpenCV.ppt
Intro_OpenCV.pptIntro_OpenCV.ppt
Intro_OpenCV.ppt
 
OpenCV+Android.pptx
OpenCV+Android.pptxOpenCV+Android.pptx
OpenCV+Android.pptx
 
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres..."The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
 
OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012
 
Presentation1.2.pptx
Presentation1.2.pptxPresentation1.2.pptx
Presentation1.2.pptx
 
Computer Vision Landscape : Present and Future
Computer Vision Landscape : Present and FutureComputer Vision Landscape : Present and Future
Computer Vision Landscape : Present and Future
 
Marek Suplata Projects
Marek Suplata ProjectsMarek Suplata Projects
Marek Suplata Projects
 
Eclipse Con Europe 2014 How to use DAWN Science Project
Eclipse Con Europe 2014 How to use DAWN Science ProjectEclipse Con Europe 2014 How to use DAWN Science Project
Eclipse Con Europe 2014 How to use DAWN Science Project
 
01 foundations
01 foundations01 foundations
01 foundations
 
Rapid object detection using boosted cascade of simple features
Rapid object detection using boosted  cascade of simple featuresRapid object detection using boosted  cascade of simple features
Rapid object detection using boosted cascade of simple features
 
Linux and Open Source in Math, Science and Engineering
Linux and Open Source in Math, Science and EngineeringLinux and Open Source in Math, Science and Engineering
Linux and Open Source in Math, Science and Engineering
 
Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCVAutomatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCV
 
Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCV Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCV
 
Новый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоныНовый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоны
 
Vision based system for monitoring the loss of attention in automotive driver
Vision based system for monitoring the loss of attention in automotive driverVision based system for monitoring the loss of attention in automotive driver
Vision based system for monitoring the loss of attention in automotive driver
 
Sem 2 Presentation
Sem 2 PresentationSem 2 Presentation
Sem 2 Presentation
 
MXNet Workshop
MXNet WorkshopMXNet Workshop
MXNet Workshop
 
Creating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector GraphicsCreating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector Graphics
 
Text Detection and Recognition in Natural Images
Text Detection and Recognition in Natural ImagesText Detection and Recognition in Natural Images
Text Detection and Recognition in Natural Images
 
Onnc intro
Onnc introOnnc intro
Onnc intro
 

Mais de Camera Culture Group, MIT Media Lab

God’s Eye View: Will global AI empower us or destroy us? | Ramesh Raskar
God’s Eye View: Will global AI empower us or destroy us? | Ramesh Raskar God’s Eye View: Will global AI empower us or destroy us? | Ramesh Raskar
God’s Eye View: Will global AI empower us or destroy us? | Ramesh Raskar Camera Culture Group, MIT Media Lab
 
Dont follow the rainbow: How to avoid career traps that can lead you to fail,...
Dont follow the rainbow: How to avoid career traps that can lead you to fail,...Dont follow the rainbow: How to avoid career traps that can lead you to fail,...
Dont follow the rainbow: How to avoid career traps that can lead you to fail,...Camera Culture Group, MIT Media Lab
 
Making Invisible Visible, Ramesh Raskar Keynote at Embedded Vision 2019
Making Invisible Visible, Ramesh Raskar Keynote at Embedded Vision 2019Making Invisible Visible, Ramesh Raskar Keynote at Embedded Vision 2019
Making Invisible Visible, Ramesh Raskar Keynote at Embedded Vision 2019Camera Culture Group, MIT Media Lab
 
Split Learning versus Federated Learning for Data Transparent ML, Camera Cult...
Split Learning versus Federated Learning for Data Transparent ML, Camera Cult...Split Learning versus Federated Learning for Data Transparent ML, Camera Cult...
Split Learning versus Federated Learning for Data Transparent ML, Camera Cult...Camera Culture Group, MIT Media Lab
 

Mais de Camera Culture Group, MIT Media Lab (20)

Raskar Sig2017 Siggraph Achievement Award Talk
Raskar Sig2017 Siggraph Achievement Award TalkRaskar Sig2017 Siggraph Achievement Award Talk
Raskar Sig2017 Siggraph Achievement Award Talk
 
Lost Decade of Computational Photography
Lost Decade of Computational PhotographyLost Decade of Computational Photography
Lost Decade of Computational Photography
 
Covid Safe Paths
Covid Safe PathsCovid Safe Paths
Covid Safe Paths
 
God’s Eye View: Will global AI empower us or destroy us? | Ramesh Raskar
God’s Eye View: Will global AI empower us or destroy us? | Ramesh Raskar God’s Eye View: Will global AI empower us or destroy us? | Ramesh Raskar
God’s Eye View: Will global AI empower us or destroy us? | Ramesh Raskar
 
Dont follow the rainbow: How to avoid career traps that can lead you to fail,...
Dont follow the rainbow: How to avoid career traps that can lead you to fail,...Dont follow the rainbow: How to avoid career traps that can lead you to fail,...
Dont follow the rainbow: How to avoid career traps that can lead you to fail,...
 
Raskar PhD and MS Thesis Guidance
Raskar PhD and MS Thesis GuidanceRaskar PhD and MS Thesis Guidance
Raskar PhD and MS Thesis Guidance
 
Making Invisible Visible, Ramesh Raskar Keynote at Embedded Vision 2019
Making Invisible Visible, Ramesh Raskar Keynote at Embedded Vision 2019Making Invisible Visible, Ramesh Raskar Keynote at Embedded Vision 2019
Making Invisible Visible, Ramesh Raskar Keynote at Embedded Vision 2019
 
Augmented Surgeons: AI AR for Anatome, Raskar Aria 2019
Augmented Surgeons: AI AR for Anatome, Raskar Aria 2019Augmented Surgeons: AI AR for Anatome, Raskar Aria 2019
Augmented Surgeons: AI AR for Anatome, Raskar Aria 2019
 
Geo-spatial Research: Transition from Analysis to Synthesis
Geo-spatial Research: Transition from Analysis to SynthesisGeo-spatial Research: Transition from Analysis to Synthesis
Geo-spatial Research: Transition from Analysis to Synthesis
 
Split Learning versus Federated Learning for Data Transparent ML, Camera Cult...
Split Learning versus Federated Learning for Data Transparent ML, Camera Cult...Split Learning versus Federated Learning for Data Transparent ML, Camera Cult...
Split Learning versus Federated Learning for Data Transparent ML, Camera Cult...
 
Unspoken Challenges in AR and XR
Unspoken Challenges in AR and XRUnspoken Challenges in AR and XR
Unspoken Challenges in AR and XR
 
Raskar stanfordextremecompuimagingapr2016
Raskar stanfordextremecompuimagingapr2016Raskar stanfordextremecompuimagingapr2016
Raskar stanfordextremecompuimagingapr2016
 
What is SIGGRAPH NEXT? Intro by Ramesh Raskar
What is SIGGRAPH NEXT? Intro by Ramesh RaskarWhat is SIGGRAPH NEXT? Intro by Ramesh Raskar
What is SIGGRAPH NEXT? Intro by Ramesh Raskar
 
What is Media in MIT Media Lab, Why 'Camera Culture'
What is Media in MIT Media Lab, Why 'Camera Culture'What is Media in MIT Media Lab, Why 'Camera Culture'
What is Media in MIT Media Lab, Why 'Camera Culture'
 
Raskar UIST Keynote 2015 November
Raskar UIST Keynote 2015 NovemberRaskar UIST Keynote 2015 November
Raskar UIST Keynote 2015 November
 
Multiview Imaging HW Overview
Multiview Imaging HW OverviewMultiview Imaging HW Overview
Multiview Imaging HW Overview
 
Time of Flight Cameras - Refael Whyte
Time of Flight Cameras - Refael WhyteTime of Flight Cameras - Refael Whyte
Time of Flight Cameras - Refael Whyte
 
Leap Motion Development (Rohan Puri)
Leap Motion Development (Rohan Puri)Leap Motion Development (Rohan Puri)
Leap Motion Development (Rohan Puri)
 
Compressed Sensing - Achuta Kadambi
Compressed Sensing - Achuta KadambiCompressed Sensing - Achuta Kadambi
Compressed Sensing - Achuta Kadambi
 
Coded Photography - Ramesh Raskar
Coded Photography - Ramesh RaskarCoded Photography - Ramesh Raskar
Coded Photography - Ramesh Raskar
 

Último

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Último (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Computer Vision Introduction

  • 1. Computer Vision – Intro Images are taken from: Computer Vision : Algorithms and Applications / Richard Szeliski
  • 4. Open CV OpenCV (Open Source Computer Vision Library: http://opencv.org) is an open- source BSD-licensed library that includes several hundreds of computer vision algorithms.
  • 5. Open CV – hard facts • OpenCV is released under a BSD license • Free for both academic and commercial use. • C++, C, Python and Java interfaces. • Supports Windows, Linux, Mac OS, iOS and Android. • Written in optimized C/C++ • Ctake advantage of multi-core processing. • Downloads exceeding 6 million. • Latest version 2.4.6
  • 6. Open CV – intro (1/2) OpenCV has a modular structure, which means that the package includes several shared or static libraries. The following modules are available: core - a compact module defining basic data structures, including the dense multi-dimensional array Mat and basic functions used by all other modules. imgproc - an image processing module that includes linear and non-linear image filtering, geometrical image transformations (resize, affine and perspective warping, generic table-based remapping), color space conversion, histograms, and so on. video - a video analysis module that includes motion estimation, background subtraction, and object tracking algorithms. calib3d - basic multiple-view geometry algorithms, single and stereo camera calibration, object pose estimation, stereo correspondence algorithms, and elements of 3D reconstruction.
  • 7. Open CV – intro (2/2) features2d - salient feature detectors, descriptors, and descriptor matchers. objdetect - detection of objects and instances of the predefined classes (for example, faces, eyes, mugs, people, cars, and so on). highgui - an easy-to-use interface to video capturing, image and video codecs, as well as simple UI capabilities. gpu - GPU-accelerated algorithms from different OpenCV modules. ... some other helper modules, such as FLANN and Google test wrappers, Python bindings, and others. http://docs.opencv.org/doc/tutorials/tutorials.html
  • 8. Android programming - steps Minimum skills: Java for android / Objective C for iOS openCV C++ for native code Minimum installation for android: (We will learn and apply later today) Eclipse IDE Android ADT openCV openCV C++/native Simulator
  • 9. Canny Edge Detector • void Canny(InputArray image, OutputArray edges, double threshold1, double threshold2, int apertureSize=3, bool L2gradient=false ) • Parameters: image – single-channel 8-bit input image. edges – output edge map; it has the same size and type as image . threshold1 – first threshold for the hysteresis procedure. threshold2 – second threshold for the hysteresis procedure. apertureSize – aperture size for the Sobel() operator. L2gradient – a flag, indicating whether a more accurate L_2 norm =sqrt{(dI/dx)^2 + (dI/dy)^2} should be used to calculate the image gradient magnitude ( L2gradient=true ), or whether the default L_1 norm =|dI/dx|+|dI/dy| is enough ( L2gradient=false ).
  • 10. Canny Edge Detector - code Mat src, src_gray; Mat dst, detected_edges; int edgeThresh = 1; int lowThreshold = 1; int const max_lowThreshold = 100; int kernel_size = 3; char* window_name = "Edge Map"; /// Reduce noise with a kernel 3x3. Assume src_gray is already read blur( src_gray, detected_edges, Size(3,3) ); /// Canny detector Canny( detected_edges, detected_edges, lowThreshold, lowThreshold, kernel_size ); /// Using Canny's output as a mask, we display our result dst = Scalar::all(0); src.copyTo( dst, detected_edges); imshow( window_name, dst );
  • 11. Hough Transform • void HoughLines(InputArray image, OutputArray lines, double rho, double theta, Int threshold, double srn=0, double stn=0 ) • Parameters: image – 8-bit, single-channel binary source image. lines – Output vector of lines rho – Distance resolution of the accumulator in pixels. theta – Angle resolution of the accumulator in radians. threshold – Accumulator threshold parameter. srn – For the multi-scale Hough transform, it is a divisor for the distance resolution rho. stn – For the multi-scale Hough transform, it is a divisor for the distance resolution theta.
  • 12. Hough Transform - code Mat dst, cdst; Canny(src, dst, 50, 200, 3); cvtColor(dst, cdst, CV_GRAY2BGR); vector<Vec2f> lines; HoughLines(dst, lines, 1, CV_PI/180, 100, 0, 0 ); // Draw the lines for( size_t i = 0; i < lines.size(); i++ ) { float rho = lines[i][0], theta = lines[i][1]; Point pt1, pt2; double a = cos(theta), b = sin(theta); double x0 = a*rho, y0 = b*rho; pt1.x = cvRound(x0 + 1000*(-b)); pt1.y = cvRound(y0 + 1000*(a)); pt2.x = cvRound(x0 - 1000*(-b)); pt2.y = cvRound(y0 - 1000*(a)); line( cdst, pt1, pt2, Scalar(0,0,255), 3, CV_AA); }
  • 13. Cascade classifier • void CascadeClassifier::detectMultiScale(const Mat& image, vector<Rect>& objects, double scaleFactor=1.1, int minNeighbors=3, int flags=0, Size minSize=Size(), Size maxSize=Size()) • Parameters: cascade – Haar classifier cascade (OpenCV 1.x API only). It can be loaded from XML or YAML file using Load(). image – Matrix of the type CV_8U containing an image where objects are detected. objects – Vector of rectangles where each rectangle contains the detected object. scaleFactor – Parameter specifying how much the image size is reduced at each image scale. minNeighbors – Parameter specifying how many neighbors each candidate rectangle should have to retain it. flags – Parameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade. minSize – Minimum possible object size. Objects smaller than that are ignored. maxSize – Maximum possible object size. Objects larger than that are ignored.
  • 14. Cascade classifier - codeString face_cascade_name = "haarcascade_frontalface_alt.xml"; CascadeClassifier face_cascade; // load cascade face_cascade.load( face_cascade_name ) ; eyes_cascade.load( eyes_cascade_name ); Mat frame_gray; cvtColor( frame, frame_gray, CV_BGR2GRAY ); equalizeHist( frame_gray, frame_gray ); // Detect faces face_cascade.detectMultiScale( frame_gray, faces, 1.1, 2,0|CV_HAAR_SCALE_IMAGE, Size(30, 30) ); // Draw ellipses for( int i = 0; i < faces.size(); i++ ) { Point center( faces[i].x + faces[i].width*0.5, faces[i].y + faces[i].height*0.5 ); ellipse( frame, center, Size( faces[i].width*0.5, faces[i].height*0.5), 0, 0, 360, Scalar( 255, 0, 255 ), 4, 8, 0 ); }