1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-15 20:37:07 +08:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2022-01-12 13:25:47 +00:00

View File

@@ -2467,6 +2467,11 @@ int BinaryDescriptor::EDLineDetector::EDline( cv::Mat &image, LineChains &lines
offsetInLineArray = pLineSID[numOfLines]; // line was not accepted, the offset is set back
}
}
// Avoid array out of range
if(numOfLines >= lines.sId.size()) {
lines.sId.push_back(offsetInLineArray);
pLineSID = &lines.sId.front();
}
//Extract line segments from the remaining pixel; Current chain has been shortened already.
}
} //end for(unsigned int edgeID=0; edgeID<edges.numOfEdges; edgeID++)