internal ObjectDetector(IntPtr ptr, ImageScanner.FHogPyramidParameter parameter) { if (ptr == IntPtr.Zero) { throw new ArgumentException("Can not pass IntPtr.Zero", nameof(ptr)); } if (parameter == null) { throw new ArgumentNullException(nameof(parameter)); } // Dispose on DetectorImp class //this.NativePtr = ptr; this._Imp = new ScanFHogPyramidDetector(ptr, parameter); this._FHogPyramidParameter = parameter; this.NativePtr = this._Imp.NativePtr; }
public ObjectDetector(T scanner) { if (scanner == null) { throw new ArgumentNullException(nameof(scanner)); } var fhogParam = scanner.GetFHogPyramidParameter(); if (fhogParam != null) { this._Imp = new ScanFHogPyramidDetector(fhogParam); this._FHogPyramidParameter = fhogParam; this.NativePtr = this._Imp.NativePtr; return; } throw new NotSupportedException(); }