mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 17:07:39 +08:00
Ignore crops that are pure white or pure black with a little leniency
This commit is contained in:
@@ -52,9 +52,9 @@ namespace alpr
|
|||||||
|
|
||||||
// Ignore input images that are pure white or pure black
|
// Ignore input images that are pure white or pure black
|
||||||
Scalar avgPixelIntensity = mean(inputImage);
|
Scalar avgPixelIntensity = mean(inputImage);
|
||||||
if (avgPixelIntensity[0] == 255)
|
if (avgPixelIntensity[0] >= 252)
|
||||||
return;
|
return;
|
||||||
else if (avgPixelIntensity[0] == 0)
|
else if (avgPixelIntensity[0] <= 3)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Do a bilateral filter to clean the noise but keep edges sharp
|
// Do a bilateral filter to clean the noise but keep edges sharp
|
||||||
|
Reference in New Issue
Block a user