Applies a custom convolution kernel to the image.