Face Detection ActiveX Control

SetProfileFaceCascade

 

Set the classifier cascade file for profile face detection. i.e., when a person in the image is looking at left or right side. The default profile face cascade classifier is “haarcascade_profileface.xml”. If cascadeFile is empty then profile face detection is not performed.
 

Public Function SetProfileFaceCascade(
 ByVal cascadeFile As String
)

 

Parameter
cascadeFile
the name of profile face cascade classifier.

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")
.FaceDetectionControl1.ClearBlackList

List1.Clear
For i = 0 To FaceDetectionControl1.DetectedRectGetCount - 1
 ix = FaceDetectionControl1.DetectedRectGetX(i)
 iy = FaceDetectionControl1.DetectedRectGetY(i)
 iwidth = FaceDetectionControl1.DetectedRectGetWidth(i)
 iheight = FaceDetectionControl1.DetectedRectGetHeight(i)
 List1.AddItem (Str(ix) + " " + Str(iy) + " " + Str(iwidth) + " " + Str(iheight))
Next