0% found this document useful (0 votes)
150 views19 pages

HANDS ON LAB S4795 Accelerating Computer Vision Opencv Cuda

OpenCV is a popular open source computer vision library that supports GPU acceleration via CUDA. GPUs are well-suited for computer vision tasks due to their parallel architecture, similar to how the human visual cortex uses massive parallelism. This presentation demonstrates video stabilization using OpenCV with CUDA to achieve real-time performance, with GPU acceleration yielding a 3-4x speedup over CPU-only processing.

Uploaded by

open tech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
150 views19 pages

HANDS ON LAB S4795 Accelerating Computer Vision Opencv Cuda

OpenCV is a popular open source computer vision library that supports GPU acceleration via CUDA. GPUs are well-suited for computer vision tasks due to their parallel architecture, similar to how the human visual cortex uses massive parallelism. This presentation demonstrates video stabilization using OpenCV with CUDA to achieve real-time performance, with GPU acceleration yielding a 3-4x speedup over CPU-only processing.

Uploaded by

open tech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

ACCELERATING COMPUTER VISION

WITH OPENCV AND CUDA


Kirill Kornyakov (Itseez)
AGENDA
1.  Slides: OpenCV with CUDA
2.  Lab: Video Stabilization
3.  QA
OPENCV
Open Source Computer Vision Library
1. 2500+ algorithms
2. More than 8M downloads, active community
3. Permissive BSD license
4. Cross-platform
5. Real-time performance
OPENCV ARCHITECTURE
Bindings Python Java
Your application
C

Library OpenCV
Dependencies:
Threading cv::parallel_for_ Eigen, IPP, JPEG, PNG,
API Jasper, multimedia
Concurrency GCD TBB

Operating Windows Linux MacOSX iOS Android WinRT


System

Hardware x86, x64 GPU ARM MIPS

Acceleration
Tegra K1
API SSE, AVX OpenCL CUDA NEON
OPENCV CUDA API
OPENCV AND CUDA
WHY CUDA IS SO GOOD FOR VISION?
Two analogies:
§  Computer Vision vs Computer Graphics
§  Human Vision
COMPUTER VISION AND GPU
HUMAN VISION
Norbert Kruger et al.
Deep Hierarchies in the Primate Visual Cortex: What Can We Learn For Computer Vision?

•  50% of neocortex is about vision


(color area)
•  60% of it is for primitive image
processing (yellow area)

So, ~30% of our brainpower is spent on simple image processing!


TEGRA K1
ADDITIONAL INFORMATION
GTC talks
§  Joe Stam (NVIDIA) - Extending OpenCV with GPU Acceleration
§  Anton Obukhov (NVIDIA) - Computer Vision on GPU with OpenCV
§  James Fung (NVIDIA) - Computer Vision on GPU with OpenCV
NVIDIA webinars
§  Shalini Gupta (NVIDIA) - OpenCV - Accelerated Computer Vision using GPUs
§  Anatoly Baksheev (Itseez) - Getting Started with GPU-accelerated Computer Vision using
OpenCV and CUDA
Documentation
§  Homepage: http://opencv.org/platforms/cuda.html
§  Reference manual: http://docs.opencv.org/modules/gpu/doc/gpu.html
§  Tutorials: http://docs.opencv.org/doc/tutorials/gpu/table_of_content_gpu/
table_of_content_gpu.html#table-of-content-gpu
LAB
VIDEO STABILIZATION
APPLICATION LIFECYCLE
POC Regression Tests

(x86)
Performance Tests
Porting

Profiling
Optimize
bottlenecks

Fine Tuning

Productization
TIMINGS

CPU version Naive GPU version GPU w/ buffer reuse


(ms) (ms) (ms)

Feature
Detection 43 90 20
Feature
Tracking 51 64 11.8
Image
Warping 24 7.5 0.45
TOTAL 125 (118) 312 (160) 46 (32)
CONCLUSION
§  GPU greatly helps in real-time Computer Vision apps
§  It helps even better on mobile devices,
where we are usually power/performance bound

You might also like