![]() |
Mali OpenCL SDK v1.1.0
|
#include "common.h"
#include "image.h"
#include <CL/cl.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <cstddef>
#include <cmath>
Go to the source code of this file.
Functions | |
int | main (void) |
Simple Sobel filter OpenCL sample. | |
int main | ( | void | ) |
Simple Sobel filter OpenCL sample.
A sample which loads a bitmap and then passes it to the GPU. An OpenCL kernel which does Sobel filtering is then run on the data. The gradients of the image in x and y directions are returned by the GPU and are combined on the CPU to form the filtered data. The input image is loaded from assets/input.bmp. The output gradients in X and Y, as well as the combined gradient image are stored in output-dX.bmp, output-dY.bmp and output.bmp respectively.