SlideShare a Scribd company logo
1 of 21
Download to read offline
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

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 

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/