1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-15 20:37:07 +08:00

Set window_size to 1 if round down results in 0. Without this fix, we will get a floating point error in calCoherence method due to divide by zeor

This commit is contained in:
Kishor
2022-08-21 11:32:36 +05:30
parent d85887cd8b
commit 9685382eb6

View File

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