NMSBoxes function

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

NMSBoxes performs non maximum suppression given boxes and corresponding scores.

For futher details, please see: https://docs.opencv.org/4.4.0/d6/d0f/group__dnn.html#ga9d118d70a1659af729d01b10233213ee

Implementation

List<int> NMSBoxes(
  VecRect bboxes,
  VecF32 scores,
  double scoreThreshold,
  double nmsThreshold, {
  double eta = 1.0,
  int topK = 0,
}) {
  final indices = calloc<cvg.VecI32>();
  cffi.NMSBoxesWithParams(
    bboxes.ref,
    scores.ref,
    scoreThreshold,
    nmsThreshold,
    indices,
    eta,
    topK,
  );
  return VecI32.fromPointer(indices).toList();
}