Applies a custom convolution kernel to the image.
function convolveImage($image_path, $bias, $convolve_matrix)
{
    $imagick = new \Imagick(realpath($image_path));
    //$edgeFindingKernel = [-1, -1, -1, -1, 8, -1, -1, -1, -1,];
    $imagick->setImageBias($bias * \Imagick::getQuantum());
    $imagick->convolveImage($convolve_matrix);
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}