Emgu.CV.HaarCascade.HaarCascade C# (CSharp) Method

HaarCascade() public method

Create a HaarCascade object from the specific file
public HaarCascade ( String fileName ) : System
fileName String The name of the file that contains the HaarCascade object
return System
        public HaarCascade(String fileName)
        {
            FileInfo file = new FileInfo(fileName);
             if (!file.Exists)
            throw new FileNotFoundException(Properties.StringTable.FileNotFound, file.FullName);

             _ptr = CvInvoke.cvLoad(file.FullName, IntPtr.Zero, null, IntPtr.Zero);

             if (_ptr == IntPtr.Zero)
             {
            throw new NullReferenceException(String.Format(Properties.StringTable.FailToCreateHaarCascade, file.FullName));
             }
        }