This document discusses implementing satellite image filtering algorithms using GPUs with OpenCL. It evaluates the Sobel and Laplacian edge detection algorithms for efficiency and quality. The host code uses C++ and OpenCL API to transfer image data to the GPU device, compile and run the OpenCL program, then retrieve results. Testing on Landsat imagery shows the GPU outperforms the CPU for both Sobel and Laplacian filtering. An open issue is applying preprocessing like smoothing and contrast adjustment during filtering.
1. GPU Implementation of Satellite
Image Filtering using OpenCL
Institute for Geoinformatics
Advanced processing of geospatial data- GPU, Grid and
Cloud computing
Ermias Beyene Tesfamariam
15 July 2010
2. Objective
• Efficient edge detection method for remote
sensing imageries.
• implementation of image filtering on
programmable GPU using the openCL language
• Comparison of different algorithms (Sobel vs.
Laplacian) for their efficiency and quality
3. Application
• The HOST executes the code written as usual,
using C++.
• The DEVICES execute OpenCL code.
• Use specific OpenCL compiler for the CPU & for
the GPU (ATI Stream).
• The OpenCL API has functions to identify devices,
compile programs, send and receive information
and run OpenCL program on the chosen device.
4. Application
OpenCL Code:
1 - Create the OpenCL code using OpenCL
language;
Host Code:
2 - Create program using C++;
3 - Import the data to be processed;
4 - Use the OpenCL API to transfer data to the
devices;
5 - Use the OpenCL API to call executions;
6 - Retrieve processed data.
5. Main OpenCL API Commands
• Memory allocation via API
– clCreateBuffer
• Accessing device memory via API
– clEnqueueWriteBuffer
– clEnqueueReadBuffer
6. Method
• Landsat imageries
– Bands with high contrast, e.g. Band 4
• Image Convolution
– 3X3 Filtering Mask convolves over the image
• Sobel Algorithm
• Laplacian Algorithm
7. Sobel Filter
• 2-D anisotropic measure of the 1st spatial
derivative of an image.
8. Sobel filter
• consists of two kernels (Masks) which detect
horizontal and vertical changes in an image
• The 3x3 Sobel kernels are:
– Horizontal
– Vertical