diff --git a/FaceDetector.php b/FaceDetector.php index 2a2cde5..8473be5 100644 --- a/FaceDetector.php +++ b/FaceDetector.php @@ -79,6 +79,16 @@ public function faceDetect($file) throw new Exception("Can not load $file"); } + + $sharpen = array( + array(0.0, -1.0, 0.0), + array(-1.0, 5.0, -1.0), + array(0.0, -1.0, 0.0) + ); + + $divisor = array_sum(array_map('array_sum', $sharpen)); + + imageconvolution($this->canvas, $sharpen, $divisor, 0); $im_width = imagesx($this->canvas); $im_height = imagesy($this->canvas);