|
Returns number of heads found in input image file (PNG, JPG, BMP). This function requires a classifier cascade file. The cascade files must be placed in cascades directory. This directory itself must be placed at the same location where FaceDetectionControl.ocx is placed.
Public Function CountFaces( ByVal imageFile As String )
|
Parameter imageFile Specifies the path of the image file.
No Return Value
Example
|
Visual Basic Syntax FaceDetectionControl1.SetFrontalFaceCascade "haarcascade_frontalface_alt.xml" FaceDetectionControl1.SetProfileFaceCascade "haarcascade_profileface.xml FaceDetectionControl1.EnableTiltedFaceDetection True FaceDetectionControl1.EnableEqualizeHistogram True FaceDetectionControl1.SetMinNeighbors 4 FaceDetectionControl1.SetScaleFactor 1.06 FaceDetectionControl1.SetMinSize 0,0 FaceDetectionControl1.SetMaxSize 0,0 FaceDetectionControl1.SetSaveResults "c:\yourfolder\output.png" iTotalFace = FaceDetectionControl1.CountFaces("c:\yourinputfolder\yoursource.jpg")
|
|
|