SlideServe
Menu
Préférences
© SlideServe · v2026

Unlocking GPU Power: A Comprehensive Guide to Image Processing and CUDA Programming

laszlo avatar
20 diapositives · 349 Views · Jul 18, 2014

This guide explores the dynamic world of GPU computing and image processing, focusing on the powerful capabilities of CUDA programming. Originally designed for pixel calculations, GPUs excel at handling intensive image processing tasks that are too complex for CPUs. Learn how to efficiently edit images, such as adjusting brightness, cropping, and filtering using parallel processing techniques. The guide includes practical examples, from serial to parallel image processing, and offers essential steps to start programming with CUDA, ensuring you harness the full potential of your NVIDIA GPU.

Unlocking GPU Power: A Comprehensive Guide to Image Processing and CUDA Programming - slide 1
01 / 20Unlocking GPU Power: A Comprehensive Guide to Image Processing and CUDA Programming
1 / 17

Télécharger la présentation

Unlocking GPU Power: A Comprehensive Guide to Image Processing and CUDA Programming
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. general Purpose GPU computing Image Processing & CUDA Programming Jared Barnes Chris Jackson

  2. Graphics Processing Unit • Originally created to calculate pixel values • Each core executes the same set of instructions Mario projected onto several 2D planes

  3. Graphics Processing Unit • Chip is designed and manufactured by NVIDIA and AMD • Card bought by consumer is manufactured by various other companies

  4. Image Processing • What does image processing try to accomplish? • Edit an image • Detect faces in an image • Find object edges in an image • Anything you can imagine • Too computationally intensive for a CPU? • Use a GPU!

  5. Image Processing: Brightness

  6. Image Processing: Color

  7. Image Processing • Simple changes • Crop an image • Recolor an image • Move an image • Harder changes • Scale an image • Compress an image • Filter an image

  8. Image Processing Serial Example // Iterate over all pixels in the image for( int x = 0; x < image.width; x++ ) { for( int y = 0; y < image.height; y++ ) { // Get the value of the current pixel Pixel pixel = image.getPixel(x, y); // Check that Red is more intense than Green if( pixel.red > pixel.green ) { // Check that Red is more intense than Blue if( pixel.red > pixel.blue ) { pixel.red = 0; pixel.green = 0; pixel.blue = 255; } } } }

  9. Image Processing Parallel Example // Use the ID of this thread to calculate which // pixel to operate on intx = thread.Id % image.width; inty = thread.Id/ image.height; // Get the value of this thread’s pixel Pixel pixel = image.getPixel(x, y); // Check that Red is more intense than Green if( pixel.red > pixel.green ) { // Check that Red is more intense than Blue if( pixel.red > pixel.blue ) { pixel.red = 0; pixel.green= 0; pixel.blue= 255; } }

  10. CUDA • Compute Unified Device Architecture • GPU programming language developed by NVIDIA • GPUs have CUDA cores • more cores = more parallel performance

  11. CUDA

  12. How to write a CUDA program • Have a graphics card with an NVIDIA GPU capable of running CUDA programs • Install CUDA tools and compiler for Visual Studio 2008, 2010, or 2012 • Create a new CUDA project in Visual Studio

  13. Vector Addition in CUDA

  14. Vector Addition in CUDA

  15. Vector Addition in CUDA

  16. 3 Steps for Parallelization • Parallelize VectorAdd() • Allocate GPU memory & copy data to it • Modify call to VectorAdd() to launch on GPU

  17. Parallelize VectorAdd()

  18. GPU Memory: Allocate & Copy

  19. GPU Memory: Copy & Free

  20. Modify Call to VectorAdd()