SlideShare a Scribd company logo
PharoVX
Accelerated computer vision in Pharo
Dmitry Matveev // ESUG 2015 // Brescia
About
Me:
● A C++ programmer
● Playing with Smalltalk since 2009
● Itseez employee since 2013
PharoVX:
● An interface to OpenVX from Pharo
Cool, but… What is OpenVX?
OpenVX
● A standard for accelerated computer vision
● Released by Khronos group
● Specifies a set of optimized functions
● Hardware vendors will implement it for
various platforms
https://www.khronos.org/openvx/
Companies behind OpenVX
Itseez is the OpenVX working group chair
OpenVX Concepts
1. Express your computer vision task as a
graph
a. Operate with nodes and kernels
b. Each node (kernel) represents a single accelerated
operation
2. Ask hardware to perform the task
3. That’s it!
OpenVX Example
Convert to
YUV
Extract “Y”
Gaussian
blur
Canny
edge
detector
OpenVX Example
Convert to
YUV
Extract “Y”
Gaussian
blur
Canny
edge
detector
Source and destination images are available in the host
(application memory)
OpenVX Example
Convert to
YUV
Extract “Y”
Gaussian
blur
Canny
edge
detector
Source and destination images are available in the host
(application memory)
Intermediate data is somewhere in the
hardware memory (inaccessible)
OpenVX Example
Convert to
YUV
Extract “Y”
Gaussian
blur
Canny
edge
detector
Source and destination images are available in the host
(application memory)
Intermediate data is somewhere in the
hardware memory (inaccessible)
How it is executed - God (vendor) only
knows!
OpenVX
1. Reference implementation is available on
the Khronos website
2. More optimized vendor implementations to
come…
3. But we can play with it right now!
PharoVX
PharoVX
● Binding to core OpenVX functions
● Built with NativeBoost
● Provides interface to standard nodes (VX
1.0)
● Works with Khronos implementation
● ...Highly experimental: written in a week!
http://smalltalkhub.com/#!/~DmitryMatveev/PharoVX
Demo
Sample code: running Canny
runCanny
| ctx g in yuv y blr t out |
ctx := VXContext new.
g := VXGraph new: ctx.
t := VXThreshold new: ctx thresholdType: VX_THRESHOLD_TYPE_RANGE dataType: VX_TYPE_UINT8.
t lower: 64; upper: 200.
in := (Form fromFileNamed: '/tmp/lena.jpg') asVXImage: ctx.
yuv := VXImage virtual: g format: VX_DF_IMAGE_YUV4.
y := VXImage virtual: g.
blr := VXImage virtual: g.
out := VXImage new: ctx width: in width height: in height format: VX_DF_IMAGE_U8.
g colorConvert: in to: yuv;
channelExtract: yuv channel: VX_CHANNEL_Y to: y;
gaussian3x3: y to: blr;
canny: blr threshold: t gradSize: 3 normType: VX_NORM_L2 to: out.
g verify; process.
^out asForm
Status: OpenVX 1.0
AbsDiff Channel extr. Gaussian pyr. Multiply Table lookup
Accumulate Color convert HalfScale Gauss. Not Threshold
AccumulateW Convert depth Harris corners OptFlowPyrLK Warp affine
AccumulateSqr Convolve Histogram Or Warp perspecive
Add Dilate3x3 Integral Phase
And EqualizeHist Magnitude Remap
Box3x3 Erode3x3 MeanStdDev Scale
Canny FAST corners Median3x3 Sobel3x3
Channel comb. Gaussian 3x3 MinMaxLoc Subtract
Status: PharoVX 16/Jul/2015
AbsDiff Channel extr. Gaussian pyr. Multiply Table lookup
Accumulate Color convert HalfScale Gauss. Not Threshold
AccumulateW Convert depth Harris corners OptFlowPyrLK Warp affine
AccumulateSqr Convolve Histogram Or Warp perspecive
Add Dilate3x3 Integral Phase
And EqualizeHist Magnitude Remap
Box3x3 Erode3x3 MeanStdDev Scale
Canny FAST corners Median3x3 Sobel3x3
Channel comb. Gaussian 3x3 MinMaxLoc Subtract
Summary
● PharoVX is currently a prototype:
○ Provides core objects and almost all standard
kernels
○ Fragile, buggy, and so on - yes!
○ Pretty close to plain C API - probably needs to be
“Smalltalkized”
● Computer vision in Smalltalk is fun!
● Feel free to join :-)
Questions
Contacts and resources
Dmitry Matveev
● dmitry.matveev@itseez.com
● http://linkedin.com/in/dmitrym
PharoVX/OpenVX
● http://dmitrymatveev.co.uk/pharovx/
● http://smalltalkhub.com/#!/~DmitryMatveev/PharoVX
● http://khronos.org/openvx/
● http://itseez.com/
Thanks!

More Related Content

What's hot

Untitled presentation(4)
Untitled presentation(4)Untitled presentation(4)
Untitled presentation(4)
chan20kaur
 
Java Code for Sample Projects Methods
Java Code for Sample Projects MethodsJava Code for Sample Projects Methods
Java Code for Sample Projects Methods
jwjablonski
 

What's hot (20)

Inc decsourcefile
Inc decsourcefileInc decsourcefile
Inc decsourcefile
 
2 19-2018-mean of all runs
2 19-2018-mean of all runs2 19-2018-mean of all runs
2 19-2018-mean of all runs
 
Untitled presentation(4)
Untitled presentation(4)Untitled presentation(4)
Untitled presentation(4)
 
Basic Intro to WinDbg
Basic Intro to WinDbgBasic Intro to WinDbg
Basic Intro to WinDbg
 
3 rd animation
3 rd animation3 rd animation
3 rd animation
 
Java Code for Sample Projects Methods
Java Code for Sample Projects MethodsJava Code for Sample Projects Methods
Java Code for Sample Projects Methods
 
Python 3 - tutorial
Python 3 - tutorialPython 3 - tutorial
Python 3 - tutorial
 
Richard Salter: Using the Titanium OpenGL Module
Richard Salter: Using the Titanium OpenGL ModuleRichard Salter: Using the Titanium OpenGL Module
Richard Salter: Using the Titanium OpenGL Module
 
Scalability comparison: Traditional fork-join-based parallelism vs. Goroutine...
Scalability comparison: Traditional fork-join-based parallelism vs. Goroutine...Scalability comparison: Traditional fork-join-based parallelism vs. Goroutine...
Scalability comparison: Traditional fork-join-based parallelism vs. Goroutine...
 
SdE 2: Le langage Python, Allocation de memoire
SdE 2: Le langage Python, Allocation de memoireSdE 2: Le langage Python, Allocation de memoire
SdE 2: Le langage Python, Allocation de memoire
 
ClojureScript - A functional Lisp for the browser
ClojureScript - A functional Lisp for the browserClojureScript - A functional Lisp for the browser
ClojureScript - A functional Lisp for the browser
 
[Bop] Block Oriented Programming Automating Data-only Attacks
[Bop] Block Oriented Programming Automating Data-only Attacks[Bop] Block Oriented Programming Automating Data-only Attacks
[Bop] Block Oriented Programming Automating Data-only Attacks
 
Bitcoin:Next
Bitcoin:NextBitcoin:Next
Bitcoin:Next
 
Perimeter
PerimeterPerimeter
Perimeter
 
C coroutine
C coroutineC coroutine
C coroutine
 
Code
CodeCode
Code
 
Dev day linux redu
Dev day linux reduDev day linux redu
Dev day linux redu
 
201801 CSE240 Lecture 12
201801 CSE240 Lecture 12201801 CSE240 Lecture 12
201801 CSE240 Lecture 12
 
Open GL Programming Training Session I
Open GL Programming Training Session IOpen GL Programming Training Session I
Open GL Programming Training Session I
 
Ns tutorial
Ns tutorialNs tutorial
Ns tutorial
 

Similar to Pharo VX

Similar to Pharo VX (20)

Andes open cl for RISC-V
Andes open cl for RISC-VAndes open cl for RISC-V
Andes open cl for RISC-V
 
Xdebug from a to x
Xdebug from a to xXdebug from a to x
Xdebug from a to x
 
The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...
The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...
The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...
 
GNURAdioDoc-8
GNURAdioDoc-8GNURAdioDoc-8
GNURAdioDoc-8
 
GNURAdioDoc-8
GNURAdioDoc-8GNURAdioDoc-8
GNURAdioDoc-8
 
wxPython and wxFormBuilder
wxPython and wxFormBuilderwxPython and wxFormBuilder
wxPython and wxFormBuilder
 
Introduction to Xdebug
Introduction to XdebugIntroduction to Xdebug
Introduction to Xdebug
 
3-sdn-lab.pdf
3-sdn-lab.pdf3-sdn-lab.pdf
3-sdn-lab.pdf
 
Debugging node in prod
Debugging node in prodDebugging node in prod
Debugging node in prod
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Book
BookBook
Book
 
100 bugs in Open Source C/C++ projects
100 bugs in Open Source C/C++ projects 100 bugs in Open Source C/C++ projects
100 bugs in Open Source C/C++ projects
 
LCA13: Xen on ARM
LCA13: Xen on ARMLCA13: Xen on ARM
LCA13: Xen on ARM
 
Deploying Prometheus stacks with Juju
Deploying Prometheus stacks with JujuDeploying Prometheus stacks with Juju
Deploying Prometheus stacks with Juju
 
Rainbow Over the Windows: More Colors Than You Could Expect
Rainbow Over the Windows: More Colors Than You Could ExpectRainbow Over the Windows: More Colors Than You Could Expect
Rainbow Over the Windows: More Colors Than You Could Expect
 
Forge - DevCon 2016: Visual Reporting with Connected Design Data
Forge - DevCon 2016: Visual Reporting with Connected Design DataForge - DevCon 2016: Visual Reporting with Connected Design Data
Forge - DevCon 2016: Visual Reporting with Connected Design Data
 
BlueHat v17 || Out of the Truman Show: VM Escape in VMware Gracefully
BlueHat v17 || Out of the Truman Show: VM Escape in VMware Gracefully BlueHat v17 || Out of the Truman Show: VM Escape in VMware Gracefully
BlueHat v17 || Out of the Truman Show: VM Escape in VMware Gracefully
 
Getting started with wxWidgets
Getting started with wxWidgets Getting started with wxWidgets
Getting started with wxWidgets
 
Berlin sigma-2017
Berlin sigma-2017Berlin sigma-2017
Berlin sigma-2017
 
Anomalies in X-Ray Engine
Anomalies in X-Ray EngineAnomalies in X-Ray Engine
Anomalies in X-Ray Engine
 

Recently uploaded

Recently uploaded (20)

How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 

Pharo VX

  • 1. PharoVX Accelerated computer vision in Pharo Dmitry Matveev // ESUG 2015 // Brescia
  • 2. About Me: ● A C++ programmer ● Playing with Smalltalk since 2009 ● Itseez employee since 2013 PharoVX: ● An interface to OpenVX from Pharo
  • 3. Cool, but… What is OpenVX?
  • 4. OpenVX ● A standard for accelerated computer vision ● Released by Khronos group ● Specifies a set of optimized functions ● Hardware vendors will implement it for various platforms https://www.khronos.org/openvx/
  • 5. Companies behind OpenVX Itseez is the OpenVX working group chair
  • 6. OpenVX Concepts 1. Express your computer vision task as a graph a. Operate with nodes and kernels b. Each node (kernel) represents a single accelerated operation 2. Ask hardware to perform the task 3. That’s it!
  • 7. OpenVX Example Convert to YUV Extract “Y” Gaussian blur Canny edge detector
  • 8. OpenVX Example Convert to YUV Extract “Y” Gaussian blur Canny edge detector Source and destination images are available in the host (application memory)
  • 9. OpenVX Example Convert to YUV Extract “Y” Gaussian blur Canny edge detector Source and destination images are available in the host (application memory) Intermediate data is somewhere in the hardware memory (inaccessible)
  • 10. OpenVX Example Convert to YUV Extract “Y” Gaussian blur Canny edge detector Source and destination images are available in the host (application memory) Intermediate data is somewhere in the hardware memory (inaccessible) How it is executed - God (vendor) only knows!
  • 11. OpenVX 1. Reference implementation is available on the Khronos website 2. More optimized vendor implementations to come… 3. But we can play with it right now!
  • 13. PharoVX ● Binding to core OpenVX functions ● Built with NativeBoost ● Provides interface to standard nodes (VX 1.0) ● Works with Khronos implementation ● ...Highly experimental: written in a week! http://smalltalkhub.com/#!/~DmitryMatveev/PharoVX
  • 14. Demo
  • 15. Sample code: running Canny runCanny | ctx g in yuv y blr t out | ctx := VXContext new. g := VXGraph new: ctx. t := VXThreshold new: ctx thresholdType: VX_THRESHOLD_TYPE_RANGE dataType: VX_TYPE_UINT8. t lower: 64; upper: 200. in := (Form fromFileNamed: '/tmp/lena.jpg') asVXImage: ctx. yuv := VXImage virtual: g format: VX_DF_IMAGE_YUV4. y := VXImage virtual: g. blr := VXImage virtual: g. out := VXImage new: ctx width: in width height: in height format: VX_DF_IMAGE_U8. g colorConvert: in to: yuv; channelExtract: yuv channel: VX_CHANNEL_Y to: y; gaussian3x3: y to: blr; canny: blr threshold: t gradSize: 3 normType: VX_NORM_L2 to: out. g verify; process. ^out asForm
  • 16. Status: OpenVX 1.0 AbsDiff Channel extr. Gaussian pyr. Multiply Table lookup Accumulate Color convert HalfScale Gauss. Not Threshold AccumulateW Convert depth Harris corners OptFlowPyrLK Warp affine AccumulateSqr Convolve Histogram Or Warp perspecive Add Dilate3x3 Integral Phase And EqualizeHist Magnitude Remap Box3x3 Erode3x3 MeanStdDev Scale Canny FAST corners Median3x3 Sobel3x3 Channel comb. Gaussian 3x3 MinMaxLoc Subtract
  • 17. Status: PharoVX 16/Jul/2015 AbsDiff Channel extr. Gaussian pyr. Multiply Table lookup Accumulate Color convert HalfScale Gauss. Not Threshold AccumulateW Convert depth Harris corners OptFlowPyrLK Warp affine AccumulateSqr Convolve Histogram Or Warp perspecive Add Dilate3x3 Integral Phase And EqualizeHist Magnitude Remap Box3x3 Erode3x3 MeanStdDev Scale Canny FAST corners Median3x3 Sobel3x3 Channel comb. Gaussian 3x3 MinMaxLoc Subtract
  • 18. Summary ● PharoVX is currently a prototype: ○ Provides core objects and almost all standard kernels ○ Fragile, buggy, and so on - yes! ○ Pretty close to plain C API - probably needs to be “Smalltalkized” ● Computer vision in Smalltalk is fun! ● Feel free to join :-)
  • 20. Contacts and resources Dmitry Matveev ● dmitry.matveev@itseez.com ● http://linkedin.com/in/dmitrym PharoVX/OpenVX ● http://dmitrymatveev.co.uk/pharovx/ ● http://smalltalkhub.com/#!/~DmitryMatveev/PharoVX ● http://khronos.org/openvx/ ● http://itseez.com/