Here we discuss how each of the filters is implemented. Similar filters are discussed together. Mean and Gaussian filters are imposed by convoluting with a fixed 3 x 3 matrix.
In our OpenCL implementation of the Mean and Gaussian filters, we write a kernel called
filter_kernel that can be used for the two filters. We do this by configuring the third argument
filter so that it can create effects of the corresponding filter. For the Mean filter we send a nine element array, where each element's value is
1/9 and when this is convoluted with the corresponding window, it produces the effect of mean of that window. When the
filter_kernel kernel is to be called for the Gaussian filter, we pass corresponding ...