HOGDescriptor.fromFile constructor

HOGDescriptor.fromFile(
  1. String filename
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Creates the HOG descriptor and detector and loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file.

https://docs.opencv.org/4.x/d5/d33/structcv_1_1HOGDescriptor.html#a32a635936edaed1b2789caf3dcb09b6e

Implementation

factory HOGDescriptor.fromFile(String filename) {
  final p = calloc<cvg.HOGDescriptor>();
  final cp = filename.toNativeUtf8().cast<ffi.Char>();
  cvRun(() => cffi.HOGDescriptor_NewFromFile(cp, p));
  calloc.free(cp);
  return HOGDescriptor._(p);
}