/// <summary> /// Create a OpenCL cascade classifier using the specific file /// </summary> /// <param name="fileName">The file to create the classifier from</param> public OclCascadeClassifier(String fileName) : base() { #if !NETFX_CORE FileInfo file = new FileInfo(fileName); if (!file.Exists) { throw new FileNotFoundException("File not found", file.FullName); } #endif _ptr = OclInvoke.oclCascadeClassifierCreate(fileName); if (_ptr == IntPtr.Zero) { throw new NullReferenceException(String.Format("Fail to create OpenCL HaarCascade object: {0}", fileName)); } }