Skip to content

Commit 42d942e

Browse files
committed
Clearing data into the detect method of the class cv::LineSegmentDetectorImpl
1 parent 7267e94 commit 42d942e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/imgproc/src/lsd.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,9 @@ void LineSegmentDetectorImpl::detect(InputArray _image, OutputArray _lines,
430430
if(w_needed) Mat(w).copyTo(_width);
431431
if(p_needed) Mat(p).copyTo(_prec);
432432
if(n_needed) Mat(n).copyTo(_nfa);
433+
434+
// Clear used structures
435+
list.clear();
433436
}
434437

435438
void LineSegmentDetectorImpl::flsd(std::vector<Vec4f>& lines,

0 commit comments

Comments
 (0)