Skip to content

Commit 4a91f2f

Browse files
authored
Merge pull request #3331 from kishorgandham:4.x
Set window_size to 1 if round down results in 0 for barcodes
2 parents de41bb9 + 9685382 commit 4a91f2f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/barcode/src/detector/bardetect.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ void Detect::localization()
8686
for (const float scale:SCALE_LIST)
8787
{
8888
window_size = cvRound(min_side * scale);
89+
if(window_size == 0) {
90+
window_size = 1;
91+
}
8992
calCoherence(window_size);
9093
barcodeErode();
9194
regionGrowing(window_size);

0 commit comments

Comments
 (0)