python in computer vision · 2014-07-02 · motivation and background python in computer vision...
TRANSCRIPT
Motivation and BackgroundPython in Computer Vision
More InformationSummary
Python in Computer Vision
Sajjad KMS7 CSE B, MESCE
Guide: Chithra V.S
October 20, 2010
Sajjad KM Python in Computer Vision
Outline
1 Motivation and Background
What is Python?
What is Computer Vision?
Uses and Examples
2 Python in Computer Vision
Tools
Image Acquisition
3 More Information
Different Platforms
Additional Tools
4 Summary
Outline
1 Motivation and Background
What is Python?
What is Computer Vision?
Uses and Examples
2 Python in Computer Vision
Tools
Image Acquisition
3 More Information
Different Platforms
Additional Tools
4 Summary
Outline
1 Motivation and Background
What is Python?
What is Computer Vision?
Uses and Examples
2 Python in Computer Vision
Tools
Image Acquisition
3 More Information
Different Platforms
Additional Tools
4 Summary
Outline
1 Motivation and Background
What is Python?
What is Computer Vision?
Uses and Examples
2 Python in Computer Vision
Tools
Image Acquisition
3 More Information
Different Platforms
Additional Tools
4 Summary
Outline
1 Motivation and Background
What is Python?
What is Computer Vision?
Uses and Examples
2 Python in Computer Vision
Tools
Image Acquisition
3 More Information
Different Platforms
Additional Tools
4 Summary
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
A word about Python
Designed by Guido van Rossum in 1991.
General-purpose high-level programming language.
Emphasizes code readability.
Large and comprehensive library.
Supports OOP, Imperative and Functional programmingstyles.
Dynamic and Interpreted.
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
A word about Python
Designed by Guido van Rossum in 1991.
General-purpose high-level programming language.
Emphasizes code readability.
Large and comprehensive library.
Supports OOP, Imperative and Functional programmingstyles.
Dynamic and Interpreted.
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
A word about Python
Designed by Guido van Rossum in 1991.
General-purpose high-level programming language.
Emphasizes code readability.
Large and comprehensive library.
Supports OOP, Imperative and Functional programmingstyles.
Dynamic and Interpreted.
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
A word about Python
Designed by Guido van Rossum in 1991.
General-purpose high-level programming language.
Emphasizes code readability.
Large and comprehensive library.
Supports OOP, Imperative and Functional programmingstyles.
Dynamic and Interpreted.
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
A word about Python
Designed by Guido van Rossum in 1991.
General-purpose high-level programming language.
Emphasizes code readability.
Large and comprehensive library.
Supports OOP, Imperative and Functional programmingstyles.
Dynamic and Interpreted.
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
A word about Python
Designed by Guido van Rossum in 1991.
General-purpose high-level programming language.
Emphasizes code readability.
Large and comprehensive library.
Supports OOP, Imperative and Functional programmingstyles.
Dynamic and Interpreted.
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
Vision
25% of the whole brain is for vision. Around 50% of cerebralcortex is for vision, 80% of the brain is associated with visionis some manner.
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
Definition
Computer Vision is the science and technology of machinesthat see.
The goal of Computer Vision is to recognize objects andtheir motion.
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
Definition
Computer Vision is the science and technology of machinesthat see.
The goal of Computer Vision is to recognize objects andtheir motion.
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
What is it used for?
Scene reconstruction
Event detection
Video tracking
Object recognition
Learning
Motion estimation
Image resotration
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
Computer Vision crosses over with many domains
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
What makes it hard?
Figure: What we see? and What the computer see?
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
Endless
There are endless possibilities for Computer Vision and theseare few of them:
Scene reconstruction
Event detection
Video tracking
Object recognition
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
Object Recognition and Segmentation.. 1
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
Object Recognition and Segmentation.. 2
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
Object Recognition and Segmentation.. 3
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
Traffic Monitoring.. 1
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
Traffic Monitoring.. 2
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
What is Python?What is Computer Vision?Uses and Examples
Augmented Reality - Sixth Sense
A wearable gestural interface that augments the physicalworld with digital information and lets us use natural hand
gestures to interact with that information.
http://www.pranavmistry.com/projects/sixthsenseSajjad KM Python in Computer Vision
Outline
1 Motivation and Background
What is Python?
What is Computer Vision?
Uses and Examples
2 Python in Computer Vision
Tools
Image Acquisition
3 More Information
Different Platforms
Additional Tools
4 Summary
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
OpenCV
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
OpenCV
Well tested, optimized and open source code for imageprocessing and computer vision
Written in C, ensuring both fast and portable.
Has been compiled for many embedded platforms
Has multiple language wrappers including 3 for Python
Tools have been made to use graphics hardware toaccelerate CV performance on the GPU
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
OpenCV
Well tested, optimized and open source code for imageprocessing and computer vision
Written in C, ensuring both fast and portable.
Has been compiled for many embedded platforms
Has multiple language wrappers including 3 for Python
Tools have been made to use graphics hardware toaccelerate CV performance on the GPU
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
OpenCV
Well tested, optimized and open source code for imageprocessing and computer vision
Written in C, ensuring both fast and portable.
Has been compiled for many embedded platforms
Has multiple language wrappers including 3 for Python
Tools have been made to use graphics hardware toaccelerate CV performance on the GPU
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
OpenCV
Well tested, optimized and open source code for imageprocessing and computer vision
Written in C, ensuring both fast and portable.
Has been compiled for many embedded platforms
Has multiple language wrappers including 3 for Python
Tools have been made to use graphics hardware toaccelerate CV performance on the GPU
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
OpenCV
Well tested, optimized and open source code for imageprocessing and computer vision
Written in C, ensuring both fast and portable.
Has been compiled for many embedded platforms
Has multiple language wrappers including 3 for Python
Tools have been made to use graphics hardware toaccelerate CV performance on the GPU
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
Project home page and documentation is at:http://opencv.willowgarage.com
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
NumPy and SciPy
Open source library of algorithms and mathematicaltools for Python.
Gives strongly typed N-dimensional arrays to Python
Includes lots of handy tools such as optimisation andsignal processing used often in computer vision.
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
NumPy and SciPy
Open source library of algorithms and mathematicaltools for Python.
Gives strongly typed N-dimensional arrays to Python
Includes lots of handy tools such as optimisation andsignal processing used often in computer vision.
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
NumPy and SciPy
Open source library of algorithms and mathematicaltools for Python.
Gives strongly typed N-dimensional arrays to Python
Includes lots of handy tools such as optimisation andsignal processing used often in computer vision.
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
NumPy and SciPy
Plotting
Optimization.
Advanced Data Analysis.
Database.
SciPy can be downloaded from: http://www.scipy.orgNumPy is available at: http://numpy.scipy.org
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
NumPy and SciPy
Plotting
Optimization.
Advanced Data Analysis.
Database.
SciPy can be downloaded from: http://www.scipy.orgNumPy is available at: http://numpy.scipy.org
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
NumPy and SciPy
Plotting
Optimization.
Advanced Data Analysis.
Database.
SciPy can be downloaded from: http://www.scipy.orgNumPy is available at: http://numpy.scipy.org
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
NumPy and SciPy
Plotting
Optimization.
Advanced Data Analysis.
Database.
SciPy can be downloaded from: http://www.scipy.orgNumPy is available at: http://numpy.scipy.org
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
NumPy and SciPy
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
Python Imaging Library PIL
External library for the Python
Adds support for opening, manipulating, and savingmany different image file formats.
Image library is designed for fast access to data stored.
Provide a solid foundation for a general imageprocessing tool.
Quick demo of PILColor TransformationsCropping
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
Python Imaging Library PIL
External library for the Python
Adds support for opening, manipulating, and savingmany different image file formats.
Image library is designed for fast access to data stored.
Provide a solid foundation for a general imageprocessing tool.
Quick demo of PILColor TransformationsCropping
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
Python Imaging Library PIL
External library for the Python
Adds support for opening, manipulating, and savingmany different image file formats.
Image library is designed for fast access to data stored.
Provide a solid foundation for a general imageprocessing tool.
Quick demo of PILColor TransformationsCropping
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
Python Imaging Library PIL
External library for the Python
Adds support for opening, manipulating, and savingmany different image file formats.
Image library is designed for fast access to data stored.
Provide a solid foundation for a general imageprocessing tool.
Quick demo of PILColor TransformationsCropping
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
Python Imaging Library PIL
External library for the Python
Adds support for opening, manipulating, and savingmany different image file formats.
Image library is designed for fast access to data stored.
Provide a solid foundation for a general imageprocessing tool.
Quick demo of PILColor TransformationsCropping
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
Pygame
Set of Python modules designed for writing video games.
Now has basic Computer Vision support
Can be used with other Python tools -integrates wellwith numpy/scipy
Pygame can be downloaded from: http://www.pygame.org
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
Pygame
Set of Python modules designed for writing video games.
Now has basic Computer Vision support
Can be used with other Python tools -integrates wellwith numpy/scipy
Pygame can be downloaded from: http://www.pygame.org
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
Pygame
Set of Python modules designed for writing video games.
Now has basic Computer Vision support
Can be used with other Python tools -integrates wellwith numpy/scipy
Pygame can be downloaded from: http://www.pygame.org
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
Pygame
Set of Python modules designed for writing video games.
Now has basic Computer Vision support
Can be used with other Python tools -integrates wellwith numpy/scipy
Pygame can be downloaded from: http://www.pygame.org
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
Capturing and Displaying Image
Live image acquisition is crucial and used in majority CVapplications.
A quick example to egg you on! :)
Let’s use OpenCV
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
ToolsImage Acquisition
Capturing and Displaying Image
Live image acquisition is crucial and used in majority CVapplications.
A quick example to egg you on! :)
Let’s use OpenCV
Sajjad KM Python in Computer Vision
Outline
1 Motivation and Background
What is Python?
What is Computer Vision?
Uses and Examples
2 Python in Computer Vision
Tools
Image Acquisition
3 More Information
Different Platforms
Additional Tools
4 Summary
Motivation and BackgroundPython in Computer Vision
More InformationSummary
Different PlatformsAdditional Tools
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
Different PlatformsAdditional Tools
Running on an OLPC
One Laptop per Child Association, Inc.Includes Python and a webcam - thats all you need forcomputer vision!Lots of Computer Vision work on the XO has been doneusing pygame by Nirav Patel (http://eclecti.cc/olpc)
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
Different PlatformsAdditional Tools
Running on an OLPC
One Laptop per Child Association, Inc.Includes Python and a webcam - thats all you need forcomputer vision!Lots of Computer Vision work on the XO has been doneusing pygame by Nirav Patel (http://eclecti.cc/olpc)
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
Different PlatformsAdditional Tools
Running on an OLPC
One Laptop per Child Association, Inc.Includes Python and a webcam - thats all you need forcomputer vision!Lots of Computer Vision work on the XO has been doneusing pygame by Nirav Patel (http://eclecti.cc/olpc)
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
Different PlatformsAdditional Tools
Documentation and Support
The documentation in both SciPy and OpenCV was found tobe pretty good though not entirely complete. The OpenCVbook is really good.
Python is Free
Documentation is not going to be as extensive as for aprofessional package like Matlab... but you can help!
There is a wonderful community around all these librariesand tools. You can get instant support from the mailing listsand IRC channels.
Sajjad KM Python in Computer Vision
Outline
1 Motivation and Background
What is Python?
What is Computer Vision?
Uses and Examples
2 Python in Computer Vision
Tools
Image Acquisition
3 More Information
Different Platforms
Additional Tools
4 Summary
Motivation and BackgroundPython in Computer Vision
More InformationSummary
Summary
For the researchers and scholars of computer vision,using Python can help in trying out new algorithms veryquickly. The breadth of the additional libraries availableand the ease of integrating, enables them to make newand novel solutions quickly.
For someone just wanting to play around with some coolstuff, get along and dive in!
Limitations would be on the performance, but you cantune it to the maximum.
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
Summary
For the researchers and scholars of computer vision,using Python can help in trying out new algorithms veryquickly. The breadth of the additional libraries availableand the ease of integrating, enables them to make newand novel solutions quickly.
For someone just wanting to play around with some coolstuff, get along and dive in!
Limitations would be on the performance, but you cantune it to the maximum.
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
Summary
For the researchers and scholars of computer vision,using Python can help in trying out new algorithms veryquickly. The breadth of the additional libraries availableand the ease of integrating, enables them to make newand novel solutions quickly.
For someone just wanting to play around with some coolstuff, get along and dive in!
Limitations would be on the performance, but you cantune it to the maximum.
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
Thank you!
A bunch of thanks to
Ms. Chithra V.S - Guide.
Few slides from Brian Thorne, University of Canterbury,Christchurch, New Zealand
and You! - for all the patience.
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
References and Further Reading
1 Brian Thorne, University of Canterbury, Python inComputer Vision, Kiwi PyCon, Christchurch, 2009
2 Learning OpenCV - G. Bradski, A. KaehlerO’Reilly Media, September 2008.
3 Guide to NumPy - T. OliphantUT, Trelgol Publishing, 2006.
4 Python Imaging Library Handbook, PIL 1.1.3,Fredrik Lundh, Matthew Ellis, March 12, 2002
5 Pygame - http://pygame.org
6 OpenCV - http://opencv.willowgarage.com
7 NumPy/SciPy - http://scipy.org
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
References and Further Reading
1 Brian Thorne, University of Canterbury, Python inComputer Vision, Kiwi PyCon, Christchurch, 2009
2 Learning OpenCV - G. Bradski, A. KaehlerO’Reilly Media, September 2008.
3 Guide to NumPy - T. OliphantUT, Trelgol Publishing, 2006.
4 Python Imaging Library Handbook, PIL 1.1.3,Fredrik Lundh, Matthew Ellis, March 12, 2002
5 Pygame - http://pygame.org
6 OpenCV - http://opencv.willowgarage.com
7 NumPy/SciPy - http://scipy.org
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
References and Further Reading
1 Brian Thorne, University of Canterbury, Python inComputer Vision, Kiwi PyCon, Christchurch, 2009
2 Learning OpenCV - G. Bradski, A. KaehlerO’Reilly Media, September 2008.
3 Guide to NumPy - T. OliphantUT, Trelgol Publishing, 2006.
4 Python Imaging Library Handbook, PIL 1.1.3,Fredrik Lundh, Matthew Ellis, March 12, 2002
5 Pygame - http://pygame.org
6 OpenCV - http://opencv.willowgarage.com
7 NumPy/SciPy - http://scipy.org
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
References and Further Reading
1 Brian Thorne, University of Canterbury, Python inComputer Vision, Kiwi PyCon, Christchurch, 2009
2 Learning OpenCV - G. Bradski, A. KaehlerO’Reilly Media, September 2008.
3 Guide to NumPy - T. OliphantUT, Trelgol Publishing, 2006.
4 Python Imaging Library Handbook, PIL 1.1.3,Fredrik Lundh, Matthew Ellis, March 12, 2002
5 Pygame - http://pygame.org
6 OpenCV - http://opencv.willowgarage.com
7 NumPy/SciPy - http://scipy.org
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
References and Further Reading
1 Brian Thorne, University of Canterbury, Python inComputer Vision, Kiwi PyCon, Christchurch, 2009
2 Learning OpenCV - G. Bradski, A. KaehlerO’Reilly Media, September 2008.
3 Guide to NumPy - T. OliphantUT, Trelgol Publishing, 2006.
4 Python Imaging Library Handbook, PIL 1.1.3,Fredrik Lundh, Matthew Ellis, March 12, 2002
5 Pygame - http://pygame.org
6 OpenCV - http://opencv.willowgarage.com
7 NumPy/SciPy - http://scipy.org
Sajjad KM Python in Computer Vision
Motivation and BackgroundPython in Computer Vision
More InformationSummary
References and Further Reading
1 Brian Thorne, University of Canterbury, Python inComputer Vision, Kiwi PyCon, Christchurch, 2009
2 Learning OpenCV - G. Bradski, A. KaehlerO’Reilly Media, September 2008.
3 Guide to NumPy - T. OliphantUT, Trelgol Publishing, 2006.
4 Python Imaging Library Handbook, PIL 1.1.3,Fredrik Lundh, Matthew Ellis, March 12, 2002
5 Pygame - http://pygame.org
6 OpenCV - http://opencv.willowgarage.com
7 NumPy/SciPy - http://scipy.org
Sajjad KM Python in Computer Vision