Exemplo n.º 1
0
void FaceDetector::processFrame()
{
    Mat frame = getMostRecentFrame();
    if(frame.empty())
    {
        return;
    }
    detectFaces(frame);
    if(hasUpdates)
    {
        notifyControllers();
    }
}
	void DetailedFaceDetector::processFrame()
	{
		cv::Mat frame = getMostRecentFrame();

		if(frame.empty()) return;

		detectFaces(frame);

		//only detect features if the FaceDetector has updates!
		if(hasUpdates)
		{
			//only detect other features if the face detector had updates
			if(detectWhat > 0)
				detectFeatures(frame);

			//since this object disables autoNotify, do it manually now!
			//this is to avoid double updates to the controllers and 
			//only update when necessary 
			notifyControllers();
		}
	}