|
|
@ -435,12 +435,14 @@ HoughLinesSDiv( InputArray image, OutputArray lines, int type, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int pos = (int)(lst.size() - 1); |
|
|
|
|
|
|
|
if( pos >= 0 && lst[pos].rho < 0 ) |
|
|
|
|
|
|
|
lst.pop_back(); |
|
|
|
|
|
|
|
|
|
|
|
lines.create((int)lst.size(), 1, type); |
|
|
|
lines.create((int)lst.size(), 1, type); |
|
|
|
Mat _lines = lines.getMat(); |
|
|
|
Mat _lines = lines.getMat(); |
|
|
|
for( size_t idx = 0; idx < lst.size(); idx++ ) |
|
|
|
for( size_t idx = 0; idx < lst.size(); idx++ ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if( lst[idx].rho < 0 ) |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
if (type == CV_32FC2) |
|
|
|
if (type == CV_32FC2) |
|
|
|
{ |
|
|
|
{ |
|
|
|
_lines.at<Vec2f>((int)idx) = Vec2f(lst[idx].rho, lst[idx].theta); |
|
|
|
_lines.at<Vec2f>((int)idx) = Vec2f(lst[idx].rho, lst[idx].theta); |
|
|
|