Suppose there is image of 200x200, and the detecting window is 20x20, which is equal to trained sample. What is detecting procedure to detect the face in the image?
the features are determinded by harr in the lib, but why do we use integral image as feature matching in detecting?
This function is in detectMultiScale,
for( double factor = 1;; factor * = scaleFactor)//detect under each size
{
SizeoriginalWindowSize =getOriginalWindowSize();//minWndsize
...
SizescaledImageSize( cvRound(grayImage.cols/factor ), cvRound ( grayImage.rows/factor ) );//change image size
SizeprocessingRectSize(scaledImageSize.width -originalWindowSize.width + 1,scaledImageSize.height -originalWindowSize.height + 1 );//slide distance
...
if( !**detectSingleScale**( scaledImage, stripCount, processingRectSize, stripSize,yStep,factor,candidates,rejectLevels,levelWeights,outputRejectLevels) )//invoke detectSingleScale
break;
}
objects.resize(candidates.size())
↧