Equalizes the image histogram.
function equalizeImage($image_path)
{
    $imagick = new \Imagick(realpath($image_path));
    $imagick->equalizeImage();
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}