I need help with OpenCV implementation of StructuredEdgeDetection based on the random forest based approach. I'm using
CodePudding user response:
The method returns (boxes, scores)
, not just the boxes. That seems to have been changed between 2017 and 2019.
You should use this code:
(boxes, scores) = edge_boxes.getBoundingBoxes(edges, orimap)
Then the loop will work.
You encountered this issue because you're using an outdated link to that example. The link you have shows a version from 2017. That old code would work with a 2017/2018 release of OpenCV.
The current version of the example, from 2019, corresponds with the current API. The current example shows the proper usage for the current API.
Here is the change: https://github.com/opencv/opencv_contrib/commit/6ae9809b2e464b72810298b10c6cf4935886a0f1