mauricesvay / php-facedetection

Detect face in images in pure PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

report whether no face detected

Hamedhm opened this issue · comments

Hi,

Thanks for the great script.

is there any way to return FALSE if no face is detected in the image?

function HasFace($file)
	{
	$fd = new svay\FaceDetector();
	$fd->faceDetect($file);
	if (is_null($fd->getFace()))
		{
		return false;
		}
	else
		{
		return true;
		}
	}

Thanks