NMSBoxesAsync function

Future<List<int>> NMSBoxesAsync(
  1. VecRect bboxes,
  2. VecF32 scores,
  3. double scoreThreshold,
  4. double nmsThreshold, {
  5. double eta = 1.0,
  6. int topK = 0,
})

Implementation

Future<List<int>> NMSBoxesAsync(
  VecRect bboxes,
  VecF32 scores,
  double scoreThreshold,
  double nmsThreshold, {
  double eta = 1.0,
  int topK = 0,
}) async {
  final rval = cvRunAsync<List<int>>(
    (callback) => cffi.NMSBoxesWithParams_Async(
      bboxes.ref,
      scores.ref,
      scoreThreshold,
      nmsThreshold,
      eta,
      topK,
      callback,
    ),
    (c, result) => c.complete(VecI32.fromPointer(result.cast<cvg.VecI32>()).toList()),
  );
  return rval;
}