CUDA GPGPU. Ivo Ihrke Tobias Ritschel Mario Fritz

Size: px
Start display at page:

Download "CUDA GPGPU. Ivo Ihrke Tobias Ritschel Mario Fritz"

Transcription

1 CUDA GPGPU Ivo Ihrke Tobias Ritschel Mario Fritz

2 Today 3 Topics Intro to CUDA (NVIDIA slides) How is the GPU hardware organized? What is the programming model? Simple Kernels Hello World Gaussian Filtering (again) Advanced Application: Horn & Schunck Optical Flow variational method (iterative updates) use of device functions Interoperation with OpenGL for visualization

3 CODE Programming breakout Minexample (minexample.cu)

4 CODE Programming breakout Gaussian Filtering (gauss.cu)

5 Optical Flow Horn & Schunck 81 Apparent motion of brightness patterns in an image sequence (typically two frames) For images: u(x): R 2 R 2, is a vector valued fct. Often visualized as vector field or color coded Optical Flow as seen by a person at the back of a train

6 right left Example Yosemite sequence Flow field (middlebury coding) middlebury coding IPOL coding Flow field (IPOL coding)

7 Example Implementation classical algorithm and multi-scale version available In class: discuss classical algorithm can compute flow field for small displacements (1-2 pixels) Assignment: multi-scale version Can handle arbitrary displacements for objects of sufficient size

8 Optical Flow- Derivation Assume a video I(x, t): R 3 R Brightness constancy implies I x + u(x, t), t = I(x, t + 1) Look at one particular time step with flow vectors u = (u x, u y ) perform Taylor expansion of I x, t + 1 : I x, t + 1 I x, t + I x u x + I y u y + I t + O( 2 ) implies I x u x + I y u y + I t = 0 Alternative form: I u + I t = 0

9 Variational methods Variational methods work as follows min u Ω D(u) + αr(u) dx Data term measures quality of fit to the data Regularization term measures some prior knowledge about u α is a user parameter data term regularization term

10 Horn&Schunck flow Practical minimization of min u Ω L(x, u x, u (x)) dx via solution of Euler-Lagrange equation (1D case) L u + L x u/ x = 0

11 Horn&Schunck flow Horn & Schunck s variational formulation min u Ω ( I u + I t )2 + α 2 ( u x 2 + u y 2 ) dx data term regularization term Data term measures fit to brightness constancy constraint Regularization term measures smoothness of u α is a user parameter

12 Horn&Schunck flow Euler-Lagrange Equations for multiple functions of multiple variables

13 Horn&Schunck flow Euler-Lagrange equation for Horn&Schunck: I I x x u x + I y u y + I t α 2 u x = 0 I I y x u x + I y u y + I t α 2 u y = 0

14 Horn&Schunck discretization Approximation of u x u x (u x u x ) With u i,j x = 1 12 u x i 1,j 1 + u i 1,j+1 x + u i+1,j 1 x + u i+1,j+1 x u x i 1,j + u i,j 1 x + u i+1,j x + u i,j+1 x 1/12 1/6 1/12 0 1/6 1/6 1/12 1/6 1/12

15 Horn&Schunck discretization Easy: these are static derivatives of the images I x I y I x u x + I y u y + I t I x u x + I y u y + I t α 2 u x = 0 α 2 u y = 0 In practice: average left and right values for spatial derivatives

16 Horn&Schunck discretization Practical update scheme (iteration count k): u x k+1 = u x k I x u y k+1 = u y k I y I x u x k + I y u y k + I t α 2 + I x 2 + I y I x u x k + I y u y k + I t α 2 + I x 2 + I y 2 2

17 CODE Programming breakout Horn&Schunck Optical Flow (oflow.cu)

18 Debugging: CUDA OpenGL interaction Often reading back and saving out the results is inconvenient Especially for iterative schemes, difficult Browsing of iterations Looking at relevant data Finding the right scale / compression of the data under before saving Immediate feedback useful Goal: combine CUDA computation with OpenGL visualization without reading back the data from the GPU Solution: PixelBufferObjects (PBOs) Can be shared between CUDA and OpenGL Catch: Special buffers owned by OpenGL, both APIs cannot use them simultaneously need switching Mapping and Unmapping of BufferObjects After mapping: CUDA owns the buffer After Unmapping: OpenGL owns the buffer

19 CODE Programming breakout Horn&Schunck Optical Flow with OpenGL feedback (oflow_v3.cu)

20 Assignment Multi-scale Horn&Schunck We can now handle small displacements Main idea: - every displacement is small on an appropriate scale (remember: scale space) 2 options: incrementally more smoothed versions of the images at the same resolution Smoothed and sub-sampled images (less pixels less work, but more difficult) Important: incremental computation of large scale flow vector (from coarse to fine)

21 Assignment Multi-scale Algorithm: - Input I 1, I 2 Horn&Schunck uacc 0 (accumulated flow) vacc 0 (accumulated flow) for k = 1 to K compute I 2 by warping I 2 with (uacc, vacc) pre-smooth I 1 and I 2 with σ k compute I, I, I x y t u 0, v 0 compute single scale Horn&Schunck flow on smoothed images uacc+=u; vacc+=v; end Note: u = u x v = u y

22 Assignment: Adaptive stopping with convergence criterion Stop the main Horn-Schunck iteration after convergence instead of using a fixed number of iterations Condition for inner iteration index j: 1 N x ( u x j+1 (x) u x j (x)) 2 + ( u y j+1 (x) u y j (x)) 2 < ε Algorithm modification: need to sum over all elements Easy solution: download to CPU, compute there (expensive) Better solution: compute per block on GPU (best with shared memory), use atomic operations to sum all block results, download sum (needs atomicadd) Best solution (?): parallel block sum on GPU (shared mem) + atomicadd

23 Common Error Messages and Likely Reasons - a very popular one: most often memory access out of bounds - try cuda-memcheck - this often happens when using cuda-memcheck - driver may lump together many kernel calls, try reducing #iterations or similar measures to reduce computational burden - this happens when compiling with incompatible architecture and code settings - E.g. (nvcc arch compute_20 code sm_21) try removing options - things are somehow incorrectly set up something is pretty wrong in this case - Try creating a minimal example that shows the behavior, figure out the reason for misconfiguration

24 Compute Capabilities Yes Yes

25

26 Some Differences to the IPOL implementation Images are in the range [0..1] (not [0..255]) this affects the choice of α Warp strategy and implementation of multi-scale scheme are slightly different (no new equations, use of out-of-the box classic Horn-Schunck at every scale) Continuous decrease of α with decreasing σ k

27 Parallel Sum Not an easy per-pixel operation Reduce operation Common for control flow problems [Nickolls 08]

28 Parallel Sum [Nickolls 08]

29 AtomicAdd (for floats) Needs Compute capability 2.0 nvcc -arch compute_20 -code sm_20

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE COMPUTER VISION 2017-2018 > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE OUTLINE Optical flow Lucas-Kanade Horn-Schunck Applications of optical flow Optical flow tracking Histograms of oriented flow Assignment

More information

Optical Flow Estimation with CUDA. Mikhail Smirnov

Optical Flow Estimation with CUDA. Mikhail Smirnov Optical Flow Estimation with CUDA Mikhail Smirnov msmirnov@nvidia.com Document Change History Version Date Responsible Reason for Change Mikhail Smirnov Initial release Abstract Optical flow is the apparent

More information

CS-465 Computer Vision

CS-465 Computer Vision CS-465 Computer Vision Nazar Khan PUCIT 9. Optic Flow Optic Flow Nazar Khan Computer Vision 2 / 25 Optic Flow Nazar Khan Computer Vision 3 / 25 Optic Flow Where does pixel (x, y) in frame z move to in

More information

Computational Optical Imaging - Optique Numerique. -- Single and Multiple View Geometry, Stereo matching --

Computational Optical Imaging - Optique Numerique. -- Single and Multiple View Geometry, Stereo matching -- Computational Optical Imaging - Optique Numerique -- Single and Multiple View Geometry, Stereo matching -- Autumn 2015 Ivo Ihrke with slides by Thorsten Thormaehlen Reminder: Feature Detection and Matching

More information

Mariya Zhariy. Uttendorf Introduction to Optical Flow. Mariya Zhariy. Introduction. Determining. Optical Flow. Results. Motivation Definition

Mariya Zhariy. Uttendorf Introduction to Optical Flow. Mariya Zhariy. Introduction. Determining. Optical Flow. Results. Motivation Definition to Constraint to Uttendorf 2005 Contents to Constraint 1 Contents to Constraint 1 2 Constraint Contents to Constraint 1 2 Constraint 3 Visual cranial reflex(vcr)(?) to Constraint Rapidly changing scene

More information

Motion Estimation (II) Ce Liu Microsoft Research New England

Motion Estimation (II) Ce Liu Microsoft Research New England Motion Estimation (II) Ce Liu celiu@microsoft.com Microsoft Research New England Last time Motion perception Motion representation Parametric motion: Lucas-Kanade T I x du dv = I x I T x I y I x T I y

More information

Dense Image-based Motion Estimation Algorithms & Optical Flow

Dense Image-based Motion Estimation Algorithms & Optical Flow Dense mage-based Motion Estimation Algorithms & Optical Flow Video A video is a sequence of frames captured at different times The video data is a function of v time (t) v space (x,y) ntroduction to motion

More information

CS6670: Computer Vision

CS6670: Computer Vision CS6670: Computer Vision Noah Snavely Lecture 19: Optical flow http://en.wikipedia.org/wiki/barberpole_illusion Readings Szeliski, Chapter 8.4-8.5 Announcements Project 2b due Tuesday, Nov 2 Please sign

More information

CS 565 Computer Vision. Nazar Khan PUCIT Lectures 15 and 16: Optic Flow

CS 565 Computer Vision. Nazar Khan PUCIT Lectures 15 and 16: Optic Flow CS 565 Computer Vision Nazar Khan PUCIT Lectures 15 and 16: Optic Flow Introduction Basic Problem given: image sequence f(x, y, z), where (x, y) specifies the location and z denotes time wanted: displacement

More information

Comparison between Optical Flow and Cross-Correlation Methods for Extraction of Velocity Fields from Particle Images

Comparison between Optical Flow and Cross-Correlation Methods for Extraction of Velocity Fields from Particle Images Comparison between Optical Flow and Cross-Correlation Methods for Extraction of Velocity Fields from Particle Images (Optical Flow vs Cross-Correlation) Tianshu Liu, Ali Merat, M. H. M. Makhmalbaf Claudia

More information

Optic Flow and Basics Towards Horn-Schunck 1

Optic Flow and Basics Towards Horn-Schunck 1 Optic Flow and Basics Towards Horn-Schunck 1 Lecture 7 See Section 4.1 and Beginning of 4.2 in Reinhard Klette: Concise Computer Vision Springer-Verlag, London, 2014 1 See last slide for copyright information.

More information

CS 4495 Computer Vision Motion and Optic Flow

CS 4495 Computer Vision Motion and Optic Flow CS 4495 Computer Vision Aaron Bobick School of Interactive Computing Administrivia PS4 is out, due Sunday Oct 27 th. All relevant lectures posted Details about Problem Set: You may *not* use built in Harris

More information

EE795: Computer Vision and Intelligent Systems

EE795: Computer Vision and Intelligent Systems EE795: Computer Vision and Intelligent Systems Spring 2012 TTh 17:30-18:45 FDH 204 Lecture 14 130307 http://www.ee.unlv.edu/~b1morris/ecg795/ 2 Outline Review Stereo Dense Motion Estimation Translational

More information

Part II: Modeling Aspects

Part II: Modeling Aspects Yosemite test sequence Illumination changes Motion discontinuities Variational Optical Flow Estimation Part II: Modeling Aspects Discontinuity Di ti it preserving i smoothness th tterms Robust data terms

More information

VC 11/12 T11 Optical Flow

VC 11/12 T11 Optical Flow VC 11/12 T11 Optical Flow Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos Miguel Tavares Coimbra Outline Optical Flow Constraint Equation Aperture

More information

B. Tech. Project Second Stage Report on

B. Tech. Project Second Stage Report on B. Tech. Project Second Stage Report on GPU Based Active Contours Submitted by Sumit Shekhar (05007028) Under the guidance of Prof Subhasis Chaudhuri Table of Contents 1. Introduction... 1 1.1 Graphic

More information

Matching. Compare region of image to region of image. Today, simplest kind of matching. Intensities similar.

Matching. Compare region of image to region of image. Today, simplest kind of matching. Intensities similar. Matching Compare region of image to region of image. We talked about this for stereo. Important for motion. Epipolar constraint unknown. But motion small. Recognition Find object in image. Recognize object.

More information

Technion - Computer Science Department - Tehnical Report CIS

Technion - Computer Science Department - Tehnical Report CIS Over-Parameterized Variational Optical Flow Tal Nir Alfred M. Bruckstein Ron Kimmel {taln, freddy, ron}@cs.technion.ac.il Department of Computer Science Technion Israel Institute of Technology Technion

More information

Illumination-robust variational optical flow based on cross-correlation

Illumination-robust variational optical flow based on cross-correlation Illumination-robust variational optical flow based on cross-correlation József Molnár 1 and Dmitry Chetverikov 2 1 Computer and Automation Research Institute Hungarian Academy of Sciences, Budapest, Hungary

More information

EE795: Computer Vision and Intelligent Systems

EE795: Computer Vision and Intelligent Systems EE795: Computer Vision and Intelligent Systems Spring 2012 TTh 17:30-18:45 FDH 204 Lecture 11 140311 http://www.ee.unlv.edu/~b1morris/ecg795/ 2 Outline Motion Analysis Motivation Differential Motion Optical

More information

smooth coefficients H. Köstler, U. Rüde

smooth coefficients H. Köstler, U. Rüde A robust multigrid solver for the optical flow problem with non- smooth coefficients H. Köstler, U. Rüde Overview Optical Flow Problem Data term and various regularizers A Robust Multigrid Solver Galerkin

More information

SURVEY OF LOCAL AND GLOBAL OPTICAL FLOW WITH COARSE TO FINE METHOD

SURVEY OF LOCAL AND GLOBAL OPTICAL FLOW WITH COARSE TO FINE METHOD SURVEY OF LOCAL AND GLOBAL OPTICAL FLOW WITH COARSE TO FINE METHOD M.E-II, Department of Computer Engineering, PICT, Pune ABSTRACT: Optical flow as an image processing technique finds its applications

More information

Motion and Optical Flow. Slides from Ce Liu, Steve Seitz, Larry Zitnick, Ali Farhadi

Motion and Optical Flow. Slides from Ce Liu, Steve Seitz, Larry Zitnick, Ali Farhadi Motion and Optical Flow Slides from Ce Liu, Steve Seitz, Larry Zitnick, Ali Farhadi We live in a moving world Perceiving, understanding and predicting motion is an important part of our daily lives Motion

More information

LINE SEARCH MULTILEVEL OPTIMIZATION AS COMPUTATIONAL METHODS FOR DENSE OPTICAL FLOW

LINE SEARCH MULTILEVEL OPTIMIZATION AS COMPUTATIONAL METHODS FOR DENSE OPTICAL FLOW LINE SEARCH MULTILEVEL OPTIMIZATION AS COMPUTATIONAL METHODS FOR DENSE OPTICAL FLOW EL MOSTAFA KALMOUN, LUIS GARRIDO, AND VICENT CASELLES Abstract. We evaluate the performance of different optimization

More information

Notes 9: Optical Flow

Notes 9: Optical Flow Course 049064: Variational Methods in Image Processing Notes 9: Optical Flow Guy Gilboa 1 Basic Model 1.1 Background Optical flow is a fundamental problem in computer vision. The general goal is to find

More information

TV-L1 Optical Flow Estimation

TV-L1 Optical Flow Estimation 214/7/1 v.5 IPOL article class Published in Image Processing On Line on 213 7 19. Submitted on 212 7 5, accepted on 212 1 29. ISSN 215 1232 c 213 IPOL & the authors CC BY NC SA This article is available

More information

Peripheral drift illusion

Peripheral drift illusion Peripheral drift illusion Does it work on other animals? Computer Vision Motion and Optical Flow Many slides adapted from J. Hays, S. Seitz, R. Szeliski, M. Pollefeys, K. Grauman and others Video A video

More information

Horn-Schunck and Lucas Kanade 1

Horn-Schunck and Lucas Kanade 1 Horn-Schunck and Lucas Kanade 1 Lecture 8 See Sections 4.2 and 4.3 in Reinhard Klette: Concise Computer Vision Springer-Verlag, London, 2014 1 See last slide for copyright information. 1 / 40 Where We

More information

Visual Tracking (1) Tracking of Feature Points and Planar Rigid Objects

Visual Tracking (1) Tracking of Feature Points and Planar Rigid Objects Intelligent Control Systems Visual Tracking (1) Tracking of Feature Points and Planar Rigid Objects Shingo Kagami Graduate School of Information Sciences, Tohoku University swk(at)ic.is.tohoku.ac.jp http://www.ic.is.tohoku.ac.jp/ja/swk/

More information

Feature Tracking and Optical Flow

Feature Tracking and Optical Flow Feature Tracking and Optical Flow Prof. D. Stricker Doz. G. Bleser Many slides adapted from James Hays, Derek Hoeim, Lana Lazebnik, Silvio Saverse, who in turn adapted slides from Steve Seitz, Rick Szeliski,

More information

Computer Vision 2. SS 18 Dr. Benjamin Guthier Professur für Bildverarbeitung. Computer Vision 2 Dr. Benjamin Guthier

Computer Vision 2. SS 18 Dr. Benjamin Guthier Professur für Bildverarbeitung. Computer Vision 2 Dr. Benjamin Guthier Computer Vision 2 SS 18 Dr. Benjamin Guthier Professur für Bildverarbeitung Computer Vision 2 Dr. Benjamin Guthier 1. IMAGE PROCESSING Computer Vision 2 Dr. Benjamin Guthier Content of this Chapter Non-linear

More information

Visual Tracking (1) Feature Point Tracking and Block Matching

Visual Tracking (1) Feature Point Tracking and Block Matching Intelligent Control Systems Visual Tracking (1) Feature Point Tracking and Block Matching Shingo Kagami Graduate School of Information Sciences, Tohoku University swk(at)ic.is.tohoku.ac.jp http://www.ic.is.tohoku.ac.jp/ja/swk/

More information

CS179: GPU Programming Recitation 5: Rendering Fractals

CS179: GPU Programming Recitation 5: Rendering Fractals CS179: GPU Programming Recitation 5: Rendering Fractals Rendering Fractals Volume data vs. texture memory Creating and using CUDA arrays Using PBOs for screen output Quaternion Julia Sets Rendering volume

More information

Robust Optical Flow Estimation

Robust Optical Flow Estimation 014/07/01 v0.5 IPOL article class Published in Image Processing On Line on 013 10 8. Submitted on 01 06, accepted on 013 05 31. ISSN 105 13 c 013 IPOL & the authors CC BY NC SA This article is available

More information

CUDA Architecture & Programming Model

CUDA Architecture & Programming Model CUDA Architecture & Programming Model Course on Multi-core Architectures & Programming Oliver Taubmann May 9, 2012 Outline Introduction Architecture Generation Fermi A Brief Look Back At Tesla What s New

More information

Feature Tracking and Optical Flow

Feature Tracking and Optical Flow Feature Tracking and Optical Flow Prof. D. Stricker Doz. G. Bleser Many slides adapted from James Hays, Derek Hoeim, Lana Lazebnik, Silvio Saverse, who 1 in turn adapted slides from Steve Seitz, Rick Szeliski,

More information

High Accuracy Optical Flow Estimation Based on a Theory for Warping

High Accuracy Optical Flow Estimation Based on a Theory for Warping High Accuracy Optical Flow Estimation Based on a Theory for Warping Thomas Brox, Andrés Bruhn, Nils Papenberg, and Joachim Weickert Mathematical Image Analysis Group Faculty of Mathematics and Computer

More information

Height field ambient occlusion using CUDA

Height field ambient occlusion using CUDA Height field ambient occlusion using CUDA 3.6.2009 Outline 1 2 3 4 Theory Kernel 5 Height fields Self occlusion Current methods Marching several directions from each fragment Sampling several times along

More information

Computer Vision Lecture 20

Computer Vision Lecture 20 Computer Perceptual Vision and Sensory WS 16/17 Augmented Computing Computer Perceptual Vision and Sensory WS 16/17 Augmented Computing Computer Perceptual Vision and Sensory WS 16/17 Augmented Computing

More information

Real-Time Scene Reconstruction. Remington Gong Benjamin Harris Iuri Prilepov

Real-Time Scene Reconstruction. Remington Gong Benjamin Harris Iuri Prilepov Real-Time Scene Reconstruction Remington Gong Benjamin Harris Iuri Prilepov June 10, 2010 Abstract This report discusses the implementation of a real-time system for scene reconstruction. Algorithms for

More information

Computer Vision Lecture 20

Computer Vision Lecture 20 Computer Perceptual Vision and Sensory WS 16/76 Augmented Computing Many slides adapted from K. Grauman, S. Seitz, R. Szeliski, M. Pollefeys, S. Lazebnik Computer Vision Lecture 20 Motion and Optical Flow

More information

Variational Methods II

Variational Methods II Mathematical Foundations of Computer Graphics and Vision Variational Methods II Luca Ballan Institute of Visual Computing Last Lecture If we have a topological vector space with an inner product and functionals

More information

Real-Time Dense and Accurate Parallel Optical Flow using CUDA

Real-Time Dense and Accurate Parallel Optical Flow using CUDA Real-Time Dense and Accurate Parallel Optical Flow using CUDA Julien Marzat INRIA Rocquencourt - ENSEM Domaine de Voluceau BP 105, 78153 Le Chesnay Cedex, France julien.marzat@gmail.com Yann Dumortier

More information

Ninio, J. and Stevens, K. A. (2000) Variations on the Hermann grid: an extinction illusion. Perception, 29,

Ninio, J. and Stevens, K. A. (2000) Variations on the Hermann grid: an extinction illusion. Perception, 29, Ninio, J. and Stevens, K. A. (2000) Variations on the Hermann grid: an extinction illusion. Perception, 29, 1209-1217. CS 4495 Computer Vision A. Bobick Sparse to Dense Correspodence Building Rome in

More information

DIFFERENTIAL. Tomáš Oberhuber, Atsushi Suzuki, Jan Vacata, Vítězslav Žabka

DIFFERENTIAL. Tomáš Oberhuber, Atsushi Suzuki, Jan Vacata, Vítězslav Žabka USE OF FOR Tomáš Oberhuber, Atsushi Suzuki, Jan Vacata, Vítězslav Žabka Faculty of Nuclear Sciences and Physical Engineering Czech Technical University in Prague Mini workshop on advanced numerical methods

More information

Optical Flow. Adriana Bocoi and Elena Pelican. 1. Introduction

Optical Flow. Adriana Bocoi and Elena Pelican. 1. Introduction Proceedings of the Fifth Workshop on Mathematical Modelling of Environmental and Life Sciences Problems Constanţa, Romania, September, 200, pp. 5 5 Optical Flow Adriana Bocoi and Elena Pelican This paper

More information

Optical Flow-Based Motion Estimation. Thanks to Steve Seitz, Simon Baker, Takeo Kanade, and anyone else who helped develop these slides.

Optical Flow-Based Motion Estimation. Thanks to Steve Seitz, Simon Baker, Takeo Kanade, and anyone else who helped develop these slides. Optical Flow-Based Motion Estimation Thanks to Steve Seitz, Simon Baker, Takeo Kanade, and anyone else who helped develop these slides. 1 Why estimate motion? We live in a 4-D world Wide applications Object

More information

Coarse to Over-Fine Optical Flow Estimation

Coarse to Over-Fine Optical Flow Estimation Coarse to Over-Fine Optical Flow Estimation Tomer Amiaz* Eyal Lubetzky Nahum Kiryati* *School of Electrical Engineering School of Computer Science Tel Aviv University Tel Aviv 69978, Israel September 11,

More information

Lecture 16: Computer Vision

Lecture 16: Computer Vision CS4442/9542b: Artificial Intelligence II Prof. Olga Veksler Lecture 16: Computer Vision Motion Slides are from Steve Seitz (UW), David Jacobs (UMD) Outline Motion Estimation Motion Field Optical Flow Field

More information

CS 220: Introduction to Parallel Computing. Introduction to CUDA. Lecture 28

CS 220: Introduction to Parallel Computing. Introduction to CUDA. Lecture 28 CS 220: Introduction to Parallel Computing Introduction to CUDA Lecture 28 Today s Schedule Project 4 Read-Write Locks Introduction to CUDA 5/2/18 CS 220: Parallel Computing 2 Today s Schedule Project

More information

Motion. 1 Introduction. 2 Optical Flow. Sohaib A Khan. 2.1 Brightness Constancy Equation

Motion. 1 Introduction. 2 Optical Flow. Sohaib A Khan. 2.1 Brightness Constancy Equation Motion Sohaib A Khan 1 Introduction So far, we have dealing with single images of a static scene taken by a fixed camera. Here we will deal with sequence of images taken at different time intervals. Motion

More information

Lucas-Kanade Motion Estimation. Thanks to Steve Seitz, Simon Baker, Takeo Kanade, and anyone else who helped develop these slides.

Lucas-Kanade Motion Estimation. Thanks to Steve Seitz, Simon Baker, Takeo Kanade, and anyone else who helped develop these slides. Lucas-Kanade Motion Estimation Thanks to Steve Seitz, Simon Baker, Takeo Kanade, and anyone else who helped develop these slides. 1 Why estimate motion? We live in a 4-D world Wide applications Object

More information

Computer Vision II Lecture 4

Computer Vision II Lecture 4 Computer Vision II Lecture 4 Color based Tracking 29.04.2014 Bastian Leibe RWTH Aachen http://www.vision.rwth-aachen.de leibe@vision.rwth-aachen.de Course Outline Single-Object Tracking Background modeling

More information

Optical Flow CS 637. Fuxin Li. With materials from Kristen Grauman, Richard Szeliski, S. Narasimhan, Deqing Sun

Optical Flow CS 637. Fuxin Li. With materials from Kristen Grauman, Richard Szeliski, S. Narasimhan, Deqing Sun Optical Flow CS 637 Fuxin Li With materials from Kristen Grauman, Richard Szeliski, S. Narasimhan, Deqing Sun Motion and perceptual organization Sometimes, motion is the only cue Motion and perceptual

More information

On a first-order primal-dual algorithm

On a first-order primal-dual algorithm On a first-order primal-dual algorithm Thomas Pock 1 and Antonin Chambolle 2 1 Institute for Computer Graphics and Vision, Graz University of Technology, 8010 Graz, Austria 2 Centre de Mathématiques Appliquées,

More information

Motion Estimation. There are three main types (or applications) of motion estimation:

Motion Estimation. There are three main types (or applications) of motion estimation: Members: D91922016 朱威達 R93922010 林聖凱 R93922044 謝俊瑋 Motion Estimation There are three main types (or applications) of motion estimation: Parametric motion (image alignment) The main idea of parametric motion

More information

Introduction to GPU hardware and to CUDA

Introduction to GPU hardware and to CUDA Introduction to GPU hardware and to CUDA Philip Blakely Laboratory for Scientific Computing, University of Cambridge Philip Blakely (LSC) GPU introduction 1 / 35 Course outline Introduction to GPU hardware

More information

Multiple Combined Constraints for Optical Flow Estimation

Multiple Combined Constraints for Optical Flow Estimation Multiple Combined Constraints for Optical Flow Estimation Ahmed Fahad and Tim Morris School of Computer Science, The University of Manchester Manchester, M3 9PL, UK ahmed.fahad@postgrad.manchester.ac.uk,

More information

GPGPU LAB. Case study: Finite-Difference Time- Domain Method on CUDA

GPGPU LAB. Case study: Finite-Difference Time- Domain Method on CUDA GPGPU LAB Case study: Finite-Difference Time- Domain Method on CUDA Ana Balevic IPVS 1 Finite-Difference Time-Domain Method Numerical computation of solutions to partial differential equations Explicit

More information

LDPC Simulation With CUDA GPU

LDPC Simulation With CUDA GPU LDPC Simulation With CUDA GPU EE179 Final Project Kangping Hu June 3 rd 2014 1 1. Introduction This project is about simulating the performance of binary Low-Density-Parity-Check-Matrix (LDPC) Code with

More information

Comparison between Motion Analysis and Stereo

Comparison between Motion Analysis and Stereo MOTION ESTIMATION The slides are from several sources through James Hays (Brown); Silvio Savarese (U. of Michigan); Octavia Camps (Northeastern); including their own slides. Comparison between Motion Analysis

More information

UnFlow: Unsupervised Learning of Optical Flow with a Bidirectional Census Loss

UnFlow: Unsupervised Learning of Optical Flow with a Bidirectional Census Loss UnFlow: Unsupervised Learning of Optical Flow with a Bidirectional Census Loss AAAI 2018, New Orleans, USA Simon Meister, Junhwa Hur, and Stefan Roth Department of Computer Science, TU Darmstadt 2 Deep

More information

CS 179: GPU Computing. Recitation 2: Synchronization, Shared memory, Matrix Transpose

CS 179: GPU Computing. Recitation 2: Synchronization, Shared memory, Matrix Transpose CS 179: GPU Computing Recitation 2: Synchronization, Shared memory, Matrix Transpose Synchronization Ideal case for parallelism: no resources shared between threads no communication between threads Many

More information

Parallel Programming Principle and Practice. Lecture 9 Introduction to GPGPUs and CUDA Programming Model

Parallel Programming Principle and Practice. Lecture 9 Introduction to GPGPUs and CUDA Programming Model Parallel Programming Principle and Practice Lecture 9 Introduction to GPGPUs and CUDA Programming Model Outline Introduction to GPGPUs and Cuda Programming Model The Cuda Thread Hierarchy / Memory Hierarchy

More information

Lecture 16: Computer Vision

Lecture 16: Computer Vision CS442/542b: Artificial ntelligence Prof. Olga Veksler Lecture 16: Computer Vision Motion Slides are from Steve Seitz (UW), David Jacobs (UMD) Outline Motion Estimation Motion Field Optical Flow Field Methods

More information

Profiling & Tuning Applications. CUDA Course István Reguly

Profiling & Tuning Applications. CUDA Course István Reguly Profiling & Tuning Applications CUDA Course István Reguly Introduction Why is my application running slow? Work it out on paper Instrument code Profile it NVIDIA Visual Profiler Works with CUDA, needs

More information

CUDA Programming Model

CUDA Programming Model CUDA Xing Zeng, Dongyue Mou Introduction Example Pro & Contra Trend Introduction Example Pro & Contra Trend Introduction What is CUDA? - Compute Unified Device Architecture. - A powerful parallel programming

More information

CUDA PROGRAMMING MODEL Chaithanya Gadiyam Swapnil S Jadhav

CUDA PROGRAMMING MODEL Chaithanya Gadiyam Swapnil S Jadhav CUDA PROGRAMMING MODEL Chaithanya Gadiyam Swapnil S Jadhav CMPE655 - Multiple Processor Systems Fall 2015 Rochester Institute of Technology Contents What is GPGPU? What s the need? CUDA-Capable GPU Architecture

More information

Motion Estimation with Adaptive Regularization and Neighborhood Dependent Constraint

Motion Estimation with Adaptive Regularization and Neighborhood Dependent Constraint 0 Digital Image Computing: Techniques and Applications Motion Estimation with Adaptive Regularization and Neighborhood Dependent Constraint Muhammad Wasim Nawaz, Abdesselam Bouzerdoum, Son Lam Phung ICT

More information

Over-Parameterized Variational Optical Flow

Over-Parameterized Variational Optical Flow DOI 10.1007/s11263-007-0051-2 Over-Parameterized Variational Optical Flow Tal Nir Alfred M. Bruckstein Ron Kimmel Received: 4 August 2006 / Accepted: 5 March 2007 Springer Science+Business Media, LLC 2007

More information

Automatic Image Alignment (direct) with a lot of slides stolen from Steve Seitz and Rick Szeliski

Automatic Image Alignment (direct) with a lot of slides stolen from Steve Seitz and Rick Szeliski Automatic Image Alignment (direct) with a lot of slides stolen from Steve Seitz and Rick Szeliski 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 Today Go over Midterm Go over Project #3

More information

CUDA Optimizations WS Intelligent Robotics Seminar. Universität Hamburg WS Intelligent Robotics Seminar Praveen Kulkarni

CUDA Optimizations WS Intelligent Robotics Seminar. Universität Hamburg WS Intelligent Robotics Seminar Praveen Kulkarni CUDA Optimizations WS 2014-15 Intelligent Robotics Seminar 1 Table of content 1 Background information 2 Optimizations 3 Summary 2 Table of content 1 Background information 2 Optimizations 3 Summary 3

More information

CS201: Computer Vision Introduction to Tracking

CS201: Computer Vision Introduction to Tracking CS201: Computer Vision Introduction to Tracking John Magee 18 November 2014 Slides courtesy of: Diane H. Theriault Question of the Day How can we represent and use motion in images? 1 What is Motion? Change

More information

Comparison of stereo inspired optical flow estimation techniques

Comparison of stereo inspired optical flow estimation techniques Comparison of stereo inspired optical flow estimation techniques ABSTRACT The similarity of the correspondence problems in optical flow estimation and disparity estimation techniques enables methods to

More information

Combinatorial optimization and its applications in image Processing. Filip Malmberg

Combinatorial optimization and its applications in image Processing. Filip Malmberg Combinatorial optimization and its applications in image Processing Filip Malmberg Part 1: Optimization in image processing Optimization in image processing Many image processing problems can be formulated

More information

Computer Vision for HCI. Motion. Motion

Computer Vision for HCI. Motion. Motion Computer Vision for HCI Motion Motion Changing scene may be observed in a sequence of images Changing pixels in image sequence provide important features for object detection and activity recognition 2

More information

GPGPU. Peter Laurens 1st-year PhD Student, NSC

GPGPU. Peter Laurens 1st-year PhD Student, NSC GPGPU Peter Laurens 1st-year PhD Student, NSC Presentation Overview 1. What is it? 2. What can it do for me? 3. How can I get it to do that? 4. What s the catch? 5. What s the future? What is it? Introducing

More information

Comparison Between The Optical Flow Computational Techniques

Comparison Between The Optical Flow Computational Techniques Comparison Between The Optical Flow Computational Techniques Sri Devi Thota #1, Kanaka Sunanda Vemulapalli* 2, Kartheek Chintalapati* 3, Phanindra Sai Srinivas Gudipudi* 4 # Associate Professor, Dept.

More information

ELEC Dr Reji Mathew Electrical Engineering UNSW

ELEC Dr Reji Mathew Electrical Engineering UNSW ELEC 4622 Dr Reji Mathew Electrical Engineering UNSW Review of Motion Modelling and Estimation Introduction to Motion Modelling & Estimation Forward Motion Backward Motion Block Motion Estimation Motion

More information

The 2D/3D Differential Optical Flow

The 2D/3D Differential Optical Flow The 2D/3D Differential Optical Flow Prof. John Barron Dept. of Computer Science University of Western Ontario London, Ontario, Canada, N6A 5B7 Email: barron@csd.uwo.ca Phone: 519-661-2111 x86896 Canadian

More information

Chapter 2 Optical Flow Estimation

Chapter 2 Optical Flow Estimation Chapter 2 Optical Flow Estimation Abstract In this chapter we review the estimation of the two-dimensional apparent motion field of two consecutive images in an image sequence. This apparent motion field

More information

Lecture 19: Motion. Effect of window size 11/20/2007. Sources of error in correspondences. Review Problem set 3. Tuesday, Nov 20

Lecture 19: Motion. Effect of window size 11/20/2007. Sources of error in correspondences. Review Problem set 3. Tuesday, Nov 20 Lecture 19: Motion Review Problem set 3 Dense stereo matching Sparse stereo matching Indexing scenes Tuesda, Nov 0 Effect of window size W = 3 W = 0 Want window large enough to have sufficient intensit

More information

LOCAL-GLOBAL OPTICAL FLOW FOR IMAGE REGISTRATION

LOCAL-GLOBAL OPTICAL FLOW FOR IMAGE REGISTRATION LOCAL-GLOBAL OPTICAL FLOW FOR IMAGE REGISTRATION Ammar Zayouna Richard Comley Daming Shi Middlesex University School of Engineering and Information Sciences Middlesex University, London NW4 4BT, UK A.Zayouna@mdx.ac.uk

More information

The Lucas & Kanade Algorithm

The Lucas & Kanade Algorithm The Lucas & Kanade Algorithm Instructor - Simon Lucey 16-423 - Designing Computer Vision Apps Today Registration, Registration, Registration. Linearizing Registration. Lucas & Kanade Algorithm. 3 Biggest

More information

High Performance Computing on GPUs using NVIDIA CUDA

High Performance Computing on GPUs using NVIDIA CUDA High Performance Computing on GPUs using NVIDIA CUDA Slides include some material from GPGPU tutorial at SIGGRAPH2007: http://www.gpgpu.org/s2007 1 Outline Motivation Stream programming Simplified HW and

More information

White Paper. Denoising. February 2007 WP _v01

White Paper. Denoising. February 2007 WP _v01 White Paper Denoising February 2007 WP-03020-001_v01 White Paper Document Change History Version Date Responsible Reason for Change _v01 AK, TS Initial release Go to sdkfeedback@nvidia.com to provide feedback

More information

Large Displacement Optical Flow & Applications

Large Displacement Optical Flow & Applications Large Displacement Optical Flow & Applications Narayanan Sundaram, Kurt Keutzer (Parlab) In collaboration with Thomas Brox (University of Freiburg) Michael Tao (University of California Berkeley) Parlab

More information

GPU programming: CUDA basics. Sylvain Collange Inria Rennes Bretagne Atlantique

GPU programming: CUDA basics. Sylvain Collange Inria Rennes Bretagne Atlantique GPU programming: CUDA basics Sylvain Collange Inria Rennes Bretagne Atlantique sylvain.collange@inria.fr This lecture: CUDA programming We have seen some GPU architecture Now how to program it? 2 Outline

More information

CSE 591: GPU Programming. Using CUDA in Practice. Klaus Mueller. Computer Science Department Stony Brook University

CSE 591: GPU Programming. Using CUDA in Practice. Klaus Mueller. Computer Science Department Stony Brook University CSE 591: GPU Programming Using CUDA in Practice Klaus Mueller Computer Science Department Stony Brook University Code examples from Shane Cook CUDA Programming Related to: score boarding load and store

More information

NVIDIA Fermi Architecture

NVIDIA Fermi Architecture Administrivia NVIDIA Fermi Architecture Patrick Cozzi University of Pennsylvania CIS 565 - Spring 2011 Assignment 4 grades returned Project checkpoint on Monday Post an update on your blog beforehand Poster

More information

CSCI 402: Computer Architectures. Parallel Processors (2) Fengguang Song Department of Computer & Information Science IUPUI.

CSCI 402: Computer Architectures. Parallel Processors (2) Fengguang Song Department of Computer & Information Science IUPUI. CSCI 402: Computer Architectures Parallel Processors (2) Fengguang Song Department of Computer & Information Science IUPUI 6.6 - End Today s Contents GPU Cluster and its network topology The Roofline performance

More information

Solving Vision Tasks with variational methods on the GPU

Solving Vision Tasks with variational methods on the GPU Solving Vision Tasks with variational methods on the GPU Horst Bischof Inst. f. Computer Graphics and Vision Graz University of Technology Joint work with Thomas Pock, Markus Unger, Arnold Irschara and

More information

Center for Computational Science

Center for Computational Science Center for Computational Science Toward GPU-accelerated meshfree fluids simulation using the fast multipole method Lorena A Barba Boston University Department of Mechanical Engineering with: Felipe Cruz,

More information

Large scale Imaging on Current Many- Core Platforms

Large scale Imaging on Current Many- Core Platforms Large scale Imaging on Current Many- Core Platforms SIAM Conf. on Imaging Science 2012 May 20, 2012 Dr. Harald Köstler Chair for System Simulation Friedrich-Alexander-Universität Erlangen-Nürnberg, Erlangen,

More information

Module 7 VIDEO CODING AND MOTION ESTIMATION

Module 7 VIDEO CODING AND MOTION ESTIMATION Module 7 VIDEO CODING AND MOTION ESTIMATION Lesson 20 Basic Building Blocks & Temporal Redundancy Instructional Objectives At the end of this lesson, the students should be able to: 1. Name at least five

More information

Capturing, Modeling, Rendering 3D Structures

Capturing, Modeling, Rendering 3D Structures Computer Vision Approach Capturing, Modeling, Rendering 3D Structures Calculate pixel correspondences and extract geometry Not robust Difficult to acquire illumination effects, e.g. specular highlights

More information

Today. Motivation. Motivation. Image gradient. Image gradient. Computational Photography

Today. Motivation. Motivation. Image gradient. Image gradient. Computational Photography Computational Photography Matthias Zwicker University of Bern Fall 009 Today Gradient domain image manipulation Introduction Gradient cut & paste Tone mapping Color-to-gray conversion Motivation Cut &

More information

EECS 556 Image Processing W 09

EECS 556 Image Processing W 09 EECS 556 Image Processing W 09 Motion estimation Global vs. Local Motion Block Motion Estimation Optical Flow Estimation (normal equation) Man slides of this lecture are courtes of prof Milanfar (UCSC)

More information

Measuring flow in digital video containing smoke and gas

Measuring flow in digital video containing smoke and gas Code: Faculty of Engineering and Sustainable Development Measuring flow in digital video containing smoke and gas Yunyi Huang June 2011 Bachelor Thesis, 15 credits, C Computer Science Computer Science

More information

Performance Analysis of Sobel Edge Detection Filter on GPU using CUDA & OpenGL

Performance Analysis of Sobel Edge Detection Filter on GPU using CUDA & OpenGL Performance Analysis of Sobel Edge Detection Filter on GPU using CUDA & OpenGL Ms. Khyati Shah Assistant Professor, Computer Engineering Department VIER-kotambi, INDIA khyati30@gmail.com Abstract: CUDA(Compute

More information