The cleaner way to set the type to grayscale is to use the Imagick class constant.
$oBw = new \Imagick($sSourceImage);
$oBw->setImageType(\Imagick::IMGTYPE_GRAYSCALE);
I've found this to be a rather harsh 'convert to grayscale' approach. Fred's color2gray script works much better, but it's written in Bash. Time to get it ported over lol
http://www.fmwconcepts.com/imagemagick/color2gray/index.php