mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-16 22:35:51 +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)
|
for (const float scale:SCALE_LIST)
|
||||||
{
|
{
|
||||||
window_size = cvRound(min_side * scale);
|
window_size = cvRound(min_side * scale);
|
||||||
|
if(window_size == 0) {
|
||||||
|
window_size = 1;
|
||||||
|
}
|
||||||
calCoherence(window_size);
|
calCoherence(window_size);
|
||||||
barcodeErode();
|
barcodeErode();
|
||||||
regionGrowing(window_size);
|
regionGrowing(window_size);
|
||||||
|
Reference in New Issue
Block a user