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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user