SlideShare a Scribd company logo
1 of 15
Mark Rees
CTO
Century Software
What is Computer Vision – 1980’s
Then it was called Machine Vision
"the automatic acquisition and analysis of images to
obtain desired data for interpreting
a scene or controlling an activity" (Schaffer, 1984).
cnt dw $0000
src dw $0000
dst dw $0000
memcpy public
ldab cnt+1 ;Set B = cnt.L
beq check ;If cnt.L=0, goto check
loop ldx src ;Set IX = src
ldaa ix ;Load A from (src)
inx ;Set src = src+1
stx src
ldx dst ;Set IX = dst
staa ix ;Store A to (dst)
inx ;Set dst = dst+1
stx dst
decb ;Decr B
bne loop ;Repeat the loop
stab cnt+1 ;Set cnt.L = 0
check tst cnt+0 ;If cnt.H=0,
beq done ;Then quit
dec cnt+0 ;Decr cnt.H
decb ;Decr B
bra loop ;Repeat the loop
done rts ;Return
What is Computer Vision - 2014
“Computer vision is a field that includes methods for acquiring,
processing, analyzing, and understanding images and, in general, high-
dimensional data from the real world in order to produce numerical or
symbolic information, e.g., in the forms of decisions. A theme in the
development of this field has been to duplicate the abilities of human
vision by electronically perceiving and understanding an image. This
image understanding can be seen as the disentangling of symbolic
information from image data using models constructed with the aid of
geometry, physics, statistics, and learning theory. Computer vision has
also been described as the enterprise of automating and integrating a
wide range of processes and representations for vision perception.”
(Wikipedia 2014 http://en.wikipedia.org/wiki/Computer_Vision)
What is Computer Vision - 2014
Computer Vision – My Reality
CV is a lot more than grabbing an image
CV
Object Illumination
Image
Capture
Sensors/Cameras Digitisation/Conversion
Image
Processing
Algorithm
Development
Implementation
Display Control
Python Imaging Library
Pillow – The friendly PIL fork python 2.6+, 3.2+
http://python-pillow.github.io/
PIL – The “original” PIL python 1.52+, 2.0+
last release 11/2009
http://effbot.org/downloads
Demo: PIL.ipynb
Scipy ndimage
N dimensional array image processing
http://docs.scipy.org/doc/scipy/reference/ndimage.html
Demo: Multi-demensional image processing.ipynb
mahotas
Another library of fast computer vision algorithms (all
implemented in C++). Operates over numpy arrays.
• Image loading & writing
(including formats like LSM or STK).
• Image filtering (morphological, Gaussian, &c)
• Feature computation (Haralick, LBPs, SURF, &c)
• Most functions work in 3D (or even 4D, 5D, up to
32D).
• Many other utility functions
http://mahotas.readthedocs.org/
PCV
Code for Programming Computer Vision in Python book
https://github.com/jesolem/PCV
SimpleCV
SimpleCV is an open source framework for building
computer vision applications. With it, you get access to
several high-powered computer vision libraries such as
OpenCV – without having to first learn about bit depths,
file formats, color spaces, buffer management,
eigenvalues, or matrix versus bitmap storage.
http://simplecv.org/
Demo: SimpleCV - The Basics.ipynb
Pygamedependency caused me some problems
Not all image manipulation worked in ipython. Simplecv
shell is where all functionality works.
OpenCV Python Wrappers
Official python wrapper for OpenCV C/C++ libraries
Two namespaces cv & cv2. Use cv2, cv deprecated
Basis of SimpleCV and other python CV libraries
Demo: OpenCV - The Basics.ipynb
Demo: OpenCV Motion Detection.ipynb
Demo: OpenCV Face Detection.ipynb
Raspberry Pi CV
OpenCV available but USB cameras slow
Rpi camera faster, uses GPU, doesn’t work with OpenCV
apt-get install python-picamera solves that.
http://picamera.readthedocs.org/en/release-1.5/
Resources
http://www.packtpub.com/opencv-computer-
vision-with-python/book
http://programmingcomputervision.com/
There also is a Python CV module PCV
http://szeliski.org/Book/
Computer Vision: Algorithms and Applications
Mark Rees
mark@censof.com
+Mark Rees
@hexdump42
hex-dump.blogspot.com
https://bitbucket.org/hexdump42/seeing-in-python-pycon-sg-2014
Contact Details

More Related Content

What's hot

Java Garbage Collection, Monitoring, and Tuning
Java Garbage Collection, Monitoring, and TuningJava Garbage Collection, Monitoring, and Tuning
Java Garbage Collection, Monitoring, and Tuning
Carol McDonald
 
Building High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortBuilding High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low Effort
Stefan Marr
 
Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)
Marcos García
 

What's hot (20)

Java Garbage Collection, Monitoring, and Tuning
Java Garbage Collection, Monitoring, and TuningJava Garbage Collection, Monitoring, and Tuning
Java Garbage Collection, Monitoring, and Tuning
 
Building High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortBuilding High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low Effort
 
Next Generation Indexes For Big Data Engineering (ODSC East 2018)
Next Generation Indexes For Big Data Engineering (ODSC East 2018)Next Generation Indexes For Big Data Engineering (ODSC East 2018)
Next Generation Indexes For Big Data Engineering (ODSC East 2018)
 
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
 
Overview of Chainer and Its Features
Overview of Chainer and Its FeaturesOverview of Chainer and Its Features
Overview of Chainer and Its Features
 
Optimizing Communicating Event-Loop Languages with Truffle
Optimizing Communicating Event-Loop Languages with TruffleOptimizing Communicating Event-Loop Languages with Truffle
Optimizing Communicating Event-Loop Languages with Truffle
 
"PyTorch Deep Learning Framework: Status and Directions," a Presentation from...
"PyTorch Deep Learning Framework: Status and Directions," a Presentation from..."PyTorch Deep Learning Framework: Status and Directions," a Presentation from...
"PyTorch Deep Learning Framework: Status and Directions," a Presentation from...
 
Numba
NumbaNumba
Numba
 
Dive Into PyTorch
Dive Into PyTorchDive Into PyTorch
Dive Into PyTorch
 
【論文紹介】Relay: A New IR for Machine Learning Frameworks
【論文紹介】Relay: A New IR for Machine Learning Frameworks【論文紹介】Relay: A New IR for Machine Learning Frameworks
【論文紹介】Relay: A New IR for Machine Learning Frameworks
 
JCConf 2020 - New Java Features Released in 2020
JCConf 2020 - New Java Features Released in 2020JCConf 2020 - New Java Features Released in 2020
JCConf 2020 - New Java Features Released in 2020
 
What’s new in Visual C++
What’s new in Visual C++What’s new in Visual C++
What’s new in Visual C++
 
Let's talk about Garbage Collection
Let's talk about Garbage CollectionLet's talk about Garbage Collection
Let's talk about Garbage Collection
 
Pune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCD
 
Chainer v3
Chainer v3Chainer v3
Chainer v3
 
OpenGL 4.4 - Scene Rendering Techniques
OpenGL 4.4 - Scene Rendering TechniquesOpenGL 4.4 - Scene Rendering Techniques
OpenGL 4.4 - Scene Rendering Techniques
 
Project Fortress
Project FortressProject Fortress
Project Fortress
 
Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)
 
Machine Trace Metrics
Machine Trace MetricsMachine Trace Metrics
Machine Trace Metrics
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John Stevenson
 

Similar to Seeing with Python presented at PyCon AU 2014

The not so short
The not so shortThe not so short
The not so short
AXM
 
Online Security Analytics on Large Scale Video Surveillance System by Yu Cao ...
Online Security Analytics on Large Scale Video Surveillance System by Yu Cao ...Online Security Analytics on Large Scale Video Surveillance System by Yu Cao ...
Online Security Analytics on Large Scale Video Surveillance System by Yu Cao ...
Spark Summit
 
How to measure everything - a million metrics per second with minimal develop...
How to measure everything - a million metrics per second with minimal develop...How to measure everything - a million metrics per second with minimal develop...
How to measure everything - a million metrics per second with minimal develop...
Jos Boumans
 
Cray XT Porting, Scaling, and Optimization Best Practices
Cray XT Porting, Scaling, and Optimization Best PracticesCray XT Porting, Scaling, and Optimization Best Practices
Cray XT Porting, Scaling, and Optimization Best Practices
Jeff Larkin
 

Similar to Seeing with Python presented at PyCon AU 2014 (20)

Seeing with Python - Pycon SG 2014
Seeing with Python - Pycon SG 2014Seeing with Python - Pycon SG 2014
Seeing with Python - Pycon SG 2014
 
OpenCV+Android.pptx
OpenCV+Android.pptxOpenCV+Android.pptx
OpenCV+Android.pptx
 
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017
 
The not so short
The not so shortThe not so short
The not so short
 
Data Summer Conf 2018, “How we build Computer vision as a service (ENG)” — Ro...
Data Summer Conf 2018, “How we build Computer vision as a service (ENG)” — Ro...Data Summer Conf 2018, “How we build Computer vision as a service (ENG)” — Ro...
Data Summer Conf 2018, “How we build Computer vision as a service (ENG)” — Ro...
 
R and cpp
R and cppR and cpp
R and cpp
 
The not so short introduction to Kinect
The not so short introduction to KinectThe not so short introduction to Kinect
The not so short introduction to Kinect
 
Numba: Array-oriented Python Compiler for NumPy
Numba: Array-oriented Python Compiler for NumPyNumba: Array-oriented Python Compiler for NumPy
Numba: Array-oriented Python Compiler for NumPy
 
COSC 426 Lect. 3 -AR Developer Tools
COSC 426 Lect. 3 -AR Developer ToolsCOSC 426 Lect. 3 -AR Developer Tools
COSC 426 Lect. 3 -AR Developer Tools
 
Online Security Analytics on Large Scale Video Surveillance System by Yu Cao ...
Online Security Analytics on Large Scale Video Surveillance System by Yu Cao ...Online Security Analytics on Large Scale Video Surveillance System by Yu Cao ...
Online Security Analytics on Large Scale Video Surveillance System by Yu Cao ...
 
01 foundations
01 foundations01 foundations
01 foundations
 
How to measure everything - a million metrics per second with minimal develop...
How to measure everything - a million metrics per second with minimal develop...How to measure everything - a million metrics per second with minimal develop...
How to measure everything - a million metrics per second with minimal develop...
 
R and C++
R and C++R and C++
R and C++
 
Using Android Things to Detect & Exterminate Reptilians
Using Android Things to Detect & Exterminate ReptiliansUsing Android Things to Detect & Exterminate Reptilians
Using Android Things to Detect & Exterminate Reptilians
 
426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools
 
Cray XT Porting, Scaling, and Optimization Best Practices
Cray XT Porting, Scaling, and Optimization Best PracticesCray XT Porting, Scaling, and Optimization Best Practices
Cray XT Porting, Scaling, and Optimization Best Practices
 
Distributed computing with Ray. Find your hyper-parameters, speed up your Pan...
Distributed computing with Ray. Find your hyper-parameters, speed up your Pan...Distributed computing with Ray. Find your hyper-parameters, speed up your Pan...
Distributed computing with Ray. Find your hyper-parameters, speed up your Pan...
 
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
 
Introduction to Machine Learning by MARK
Introduction to Machine Learning by MARKIntroduction to Machine Learning by MARK
Introduction to Machine Learning by MARK
 
PVS-Studio in the Clouds: CircleCI
PVS-Studio in the Clouds: CircleCIPVS-Studio in the Clouds: CircleCI
PVS-Studio in the Clouds: CircleCI
 

More from Mark Rees (6)

Porting a legacy app to python 3
Porting a legacy app to python 3Porting a legacy app to python 3
Porting a legacy app to python 3
 
Relational Database Access with Python
Relational Database Access with PythonRelational Database Access with Python
Relational Database Access with Python
 
Pypy is-it-ready-for-production-the-sequel
Pypy is-it-ready-for-production-the-sequelPypy is-it-ready-for-production-the-sequel
Pypy is-it-ready-for-production-the-sequel
 
PyPy - is it ready for production
PyPy - is it ready for productionPyPy - is it ready for production
PyPy - is it ready for production
 
Relational Database Access with Python ‘sans’ ORM
Relational Database Access with Python ‘sans’ ORM  Relational Database Access with Python ‘sans’ ORM
Relational Database Access with Python ‘sans’ ORM
 
What do you mean it needs to be Java based? How jython saved the day.
What do you mean it needs to be Java based? How jython saved the day.What do you mean it needs to be Java based? How jython saved the day.
What do you mean it needs to be Java based? How jython saved the day.
 

Recently uploaded

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
Safe Software
 

Recently uploaded (20)

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
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
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
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
"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 ...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Seeing with Python presented at PyCon AU 2014

  • 2. What is Computer Vision – 1980’s Then it was called Machine Vision "the automatic acquisition and analysis of images to obtain desired data for interpreting a scene or controlling an activity" (Schaffer, 1984). cnt dw $0000 src dw $0000 dst dw $0000 memcpy public ldab cnt+1 ;Set B = cnt.L beq check ;If cnt.L=0, goto check loop ldx src ;Set IX = src ldaa ix ;Load A from (src) inx ;Set src = src+1 stx src ldx dst ;Set IX = dst staa ix ;Store A to (dst) inx ;Set dst = dst+1 stx dst decb ;Decr B bne loop ;Repeat the loop stab cnt+1 ;Set cnt.L = 0 check tst cnt+0 ;If cnt.H=0, beq done ;Then quit dec cnt+0 ;Decr cnt.H decb ;Decr B bra loop ;Repeat the loop done rts ;Return
  • 3. What is Computer Vision - 2014 “Computer vision is a field that includes methods for acquiring, processing, analyzing, and understanding images and, in general, high- dimensional data from the real world in order to produce numerical or symbolic information, e.g., in the forms of decisions. A theme in the development of this field has been to duplicate the abilities of human vision by electronically perceiving and understanding an image. This image understanding can be seen as the disentangling of symbolic information from image data using models constructed with the aid of geometry, physics, statistics, and learning theory. Computer vision has also been described as the enterprise of automating and integrating a wide range of processes and representations for vision perception.” (Wikipedia 2014 http://en.wikipedia.org/wiki/Computer_Vision)
  • 4. What is Computer Vision - 2014
  • 5. Computer Vision – My Reality
  • 6. CV is a lot more than grabbing an image CV Object Illumination Image Capture Sensors/Cameras Digitisation/Conversion Image Processing Algorithm Development Implementation Display Control
  • 7. Python Imaging Library Pillow – The friendly PIL fork python 2.6+, 3.2+ http://python-pillow.github.io/ PIL – The “original” PIL python 1.52+, 2.0+ last release 11/2009 http://effbot.org/downloads Demo: PIL.ipynb
  • 8. Scipy ndimage N dimensional array image processing http://docs.scipy.org/doc/scipy/reference/ndimage.html Demo: Multi-demensional image processing.ipynb
  • 9. mahotas Another library of fast computer vision algorithms (all implemented in C++). Operates over numpy arrays. • Image loading & writing (including formats like LSM or STK). • Image filtering (morphological, Gaussian, &c) • Feature computation (Haralick, LBPs, SURF, &c) • Most functions work in 3D (or even 4D, 5D, up to 32D). • Many other utility functions http://mahotas.readthedocs.org/
  • 10. PCV Code for Programming Computer Vision in Python book https://github.com/jesolem/PCV
  • 11. SimpleCV SimpleCV is an open source framework for building computer vision applications. With it, you get access to several high-powered computer vision libraries such as OpenCV – without having to first learn about bit depths, file formats, color spaces, buffer management, eigenvalues, or matrix versus bitmap storage. http://simplecv.org/ Demo: SimpleCV - The Basics.ipynb Pygamedependency caused me some problems Not all image manipulation worked in ipython. Simplecv shell is where all functionality works.
  • 12. OpenCV Python Wrappers Official python wrapper for OpenCV C/C++ libraries Two namespaces cv & cv2. Use cv2, cv deprecated Basis of SimpleCV and other python CV libraries Demo: OpenCV - The Basics.ipynb Demo: OpenCV Motion Detection.ipynb Demo: OpenCV Face Detection.ipynb
  • 13. Raspberry Pi CV OpenCV available but USB cameras slow Rpi camera faster, uses GPU, doesn’t work with OpenCV apt-get install python-picamera solves that. http://picamera.readthedocs.org/en/release-1.5/
  • 14. Resources http://www.packtpub.com/opencv-computer- vision-with-python/book http://programmingcomputervision.com/ There also is a Python CV module PCV http://szeliski.org/Book/ Computer Vision: Algorithms and Applications