Skip to content

Commit 4ea11a0

Browse files
yarglawaldegvpisarev
authored andcommitted
update structured_edge_detection (#1579)
* update structured_edge_detection update structured_edge_detection to read models from updated p. dollar toolbox * Update structured_edge_detection.cpp * Update structured_edge_detection.cpp casting size_t to int
1 parent e351cae commit 4ea11a0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

modules/ximgproc/src/structured_edge_detection.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -801,9 +801,11 @@ class StructuredEdgeDetectionImpl : public StructuredEdgeDetection
801801
{// for j,k in [0;width)x[0;nTreesEval)
802802

803803
int currentNode = pIndex[j*nTreesEval + k];
804-
805-
int start = __rf.edgeBoundaries[currentNode];
806-
int finish = __rf.edgeBoundaries[currentNode + 1];
804+
size_t sizeBoundaries = __rf.edgeBoundaries.size();
805+
int convertedBoundaries = static_cast<int>(sizeBoundaries);
806+
int nBnds = (convertedBoundaries - 1) / (nTreesNodes * nTrees);
807+
int start = __rf.edgeBoundaries[currentNode * nBnds];
808+
int finish = __rf.edgeBoundaries[currentNode * nBnds + 1];
807809

808810
if (start == finish)
809811
continue;

0 commit comments

Comments
 (0)