SlideShare une entreprise Scribd logo
1  sur  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 );
}

Contenu connexe

Tendances

What is computer vision?
What is computer vision?What is computer vision?
What is computer vision?Qentinel
 
Introduction to object detection
Introduction to object detectionIntroduction to object detection
Introduction to object detectionBrodmann17
 
From Image Processing To Computer Vision
From Image Processing To Computer VisionFrom Image Processing To Computer Vision
From Image Processing To Computer VisionJoud Khattab
 
Occlusion and Abandoned Object Detection for Surveillance Applications
Occlusion and Abandoned Object Detection for Surveillance ApplicationsOcclusion and Abandoned Object Detection for Surveillance Applications
Occlusion and Abandoned Object Detection for Surveillance ApplicationsEditor IJCATR
 
Computer Vision Presentation Artificial Intelligence (AI)
Computer Vision Presentation Artificial Intelligence (AI)Computer Vision Presentation Artificial Intelligence (AI)
Computer Vision Presentation Artificial Intelligence (AI)AshTheMidBenchers
 
Introduction to Computer Vision.pdf
Introduction to Computer Vision.pdfIntroduction to Computer Vision.pdf
Introduction to Computer Vision.pdfKnoldus Inc.
 
Computer vision and Open CV
Computer vision and Open CVComputer vision and Open CV
Computer vision and Open CVChariza Pladin
 
An Introduction to Image Processing and Artificial Intelligence
An Introduction to Image Processing and Artificial IntelligenceAn Introduction to Image Processing and Artificial Intelligence
An Introduction to Image Processing and Artificial IntelligenceWasif Altaf
 
AI Computer vision
AI Computer visionAI Computer vision
AI Computer visionKashafnaz2
 
Image segmentation
Image segmentationImage segmentation
Image segmentationDeepak Kumar
 

Tendances (20)

What is computer vision?
What is computer vision?What is computer vision?
What is computer vision?
 
Computer vision
Computer visionComputer vision
Computer vision
 
Computer Vision
Computer VisionComputer Vision
Computer Vision
 
Introduction to object detection
Introduction to object detectionIntroduction to object detection
Introduction to object detection
 
Computer vision ppt
Computer vision pptComputer vision ppt
Computer vision ppt
 
Computer vision
Computer visionComputer vision
Computer vision
 
Computer Vision
Computer VisionComputer Vision
Computer Vision
 
Computer vision
Computer visionComputer vision
Computer vision
 
Object Recognition
Object RecognitionObject Recognition
Object Recognition
 
From Image Processing To Computer Vision
From Image Processing To Computer VisionFrom Image Processing To Computer Vision
From Image Processing To Computer Vision
 
Computer Vision
Computer VisionComputer Vision
Computer Vision
 
Occlusion and Abandoned Object Detection for Surveillance Applications
Occlusion and Abandoned Object Detection for Surveillance ApplicationsOcclusion and Abandoned Object Detection for Surveillance Applications
Occlusion and Abandoned Object Detection for Surveillance Applications
 
Computer Vision Presentation Artificial Intelligence (AI)
Computer Vision Presentation Artificial Intelligence (AI)Computer Vision Presentation Artificial Intelligence (AI)
Computer Vision Presentation Artificial Intelligence (AI)
 
Introduction to Computer Vision.pdf
Introduction to Computer Vision.pdfIntroduction to Computer Vision.pdf
Introduction to Computer Vision.pdf
 
Computer vision and Open CV
Computer vision and Open CVComputer vision and Open CV
Computer vision and Open CV
 
Ai lecture 03 computer vision
Ai lecture 03 computer visionAi lecture 03 computer vision
Ai lecture 03 computer vision
 
Image Segmentation
 Image Segmentation Image Segmentation
Image Segmentation
 
An Introduction to Image Processing and Artificial Intelligence
An Introduction to Image Processing and Artificial IntelligenceAn Introduction to Image Processing and Artificial Intelligence
An Introduction to Image Processing and Artificial Intelligence
 
AI Computer vision
AI Computer visionAI Computer vision
AI Computer vision
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 

En vedette

An Introduction to Computer Vision
An Introduction to Computer VisionAn Introduction to Computer Vision
An Introduction to Computer Visionguestd1b1b5
 
COM2304: Introduction to Computer Vision & Image Processing
COM2304: Introduction to Computer Vision & Image Processing COM2304: Introduction to Computer Vision & Image Processing
COM2304: Introduction to Computer Vision & Image Processing Hemantha Kulathilake
 
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
 

En vedette (20)

An Introduction to Computer Vision
An Introduction to Computer VisionAn Introduction to Computer Vision
An Introduction to Computer Vision
 
COM2304: Introduction to Computer Vision & Image Processing
COM2304: Introduction to Computer Vision & Image Processing COM2304: Introduction to Computer Vision & Image Processing
COM2304: Introduction to Computer Vision & Image Processing
 
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
 

Similaire à 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
 

Similaire à 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
 

Plus 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
 

Plus 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
 

Dernier

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Dernier (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

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 ); }