Viscom Software VideoCap ActiveX Control

EffectFaceTemplateFile Method

Description:   

 Set the face template file. You must set the path of face template file, otherwise it cannot detected the face and fire FaceDetected event.

Usage:   

VideoCap1.EffectFaceTemplateFile strTemplateFile

strTemplateFile
 the file name of face template file. If you do not enter the path, haarcascade_frontalface_alt.xml should existing in your application folder. same as your project or  executable  folder.
 
EffectFaceTemplateFile "haarcascade_frontalface_alt.xml"   
EffectFaceTemplateFile "c:\temp\haarcascade_frontalface_alt.xml"   
 

Return Value:

No Return value.

Example:   

This Visual Basic example shows how to use face detection

VideoCap1.EffectType =1
VideoCap1.EffectFxType=4
VideoCap1.EffectFaceShowBackProjection=true
VideoCap1.EffectFaceCaptureFaceOnly true
VideoCap1.EffectFaceCaptureToFile true
VideoCap1.EffectFaceCaptureFileName "c:\temp\test1.jpg"
VideoCap1.EffectFaceTemplateFile "haarcascade_frontalface_alt.xml"
VideoCap1.Start