Skip to content

Commit

Permalink
Merge pull request #3331 from kishorgandham:4.x
Browse files Browse the repository at this point in the history
Set window_size to 1 if round down results in 0 for barcodes
  • Loading branch information
asmorkalov authored Sep 5, 2022
2 parents de41bb9 + 9685382 commit 4a91f2f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/barcode/src/detector/bardetect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ void Detect::localization()
for (const float scale:SCALE_LIST)
{
window_size = cvRound(min_side * scale);
if(window_size == 0) {
window_size = 1;
}
calCoherence(window_size);
barcodeErode();
regionGrowing(window_size);
Expand Down

0 comments on commit 4a91f2f

Please sign in to comment.