OpenCvSharp.CascadeClassifier.Load C# (CSharp) Method

Load() public method

Loads a classifier from a file.
public Load ( string fileName ) : bool
fileName string Name of the file from which the classifier is loaded. /// The file may contain an old HAAR classifier trained by the haartraining application /// or a new cascade classifier trained by the traincascade application.
return bool
        public bool Load(string fileName)
        {
            if (disposed)
                throw new ObjectDisposedException("CascadeClassifier");
            if (String.IsNullOrEmpty(fileName))
                throw new ArgumentNullException(nameof(fileName));
            if (!File.Exists(fileName))
                throw new FileNotFoundException("\"" + fileName + "\"not found", fileName);
            return NativeMethods.objdetect_CascadeClassifier_load(ptr, fileName) != 0;
        }