TypeError when calling cv.NMSBoxes with opencvjs from React.js

Hello, I am trying to use the cv.NMSBoxes function to run the nms algorithm from opencv.js. But can’t seem to make it work, I keep getting the following error. Anyone can offer some insight as to why this is happening? Thanks a lot!

TypeError: _techstark_opencv_js__WEBPACK_IMPORTED_MODULE_2___default(...).NMSBoxes is not a function

This is how I am calling the function, everything should match the types specified in the API docs (OpenCV: Deep Neural Network module).

  bboxRects,  // cv.RectVector
  scoreVector,  // cv.FloatVector
  scoreThreshold,  // js number
  nmsThreshold,  // js number
  finalIdxs  // cv.IntVector

im almost sure, that noone bothered yet to add it to the js api
(you can only use, what’s in the “whitelist”):

(yea i know it’s crucial to use yolo nns and whatnot)

are you able to rebuild it locally ? just add it there, and give it a try … :wink:

1 Like

hmm, there might be troubles, otherwise ppl would not have reinvented wheel here: