예제 #1
0
 /// <summary>
 /// Creates an instance
 /// </summary>
 /// <param name="imageWidth">image width</param>
 /// <param name="imageHeight">image height</param>
 /// <returns></returns>
 public static CpuProgramViolaJones CreateFaceDetector(int imageWidth, int imageHeight)
 {
     var res = new CpuProgramViolaJones();
     res.ObjectDetector = CpuHaarObjectDetector.CreateFaceDetector(imageWidth, imageHeight);
     return res;
 }
예제 #2
0
 /// <summary>
 /// Creates an instance
 /// </summary>
 /// <param name="fileName">XML file containing Haar cascade stages (in OpenCL format)</param>
 /// <param name="imageWidth">image width</param>
 /// <param name="imageHeight">image height</param>
 /// <returns></returns>
 public static CpuProgramViolaJones CreateDetectorFromFile(string fileName, int imageWidth, int imageHeight)
 {
     var res = new CpuProgramViolaJones();
     res.ObjectDetector = CpuHaarObjectDetector.CreateDetectorFromFile(fileName, imageWidth, imageHeight);
     return res;
 }