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

pull/3149/head
Alexander Alekhin 3 years ago
commit bb3048d524
  1. 5
      modules/line_descriptor/src/binary_descriptor.cpp

@ -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++)

Loading…
Cancel
Save