mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 15:26:53 +08:00
Ignoring all black/white images in platelines (efficiency)
This commit is contained in:
@@ -41,10 +41,9 @@ void PlateLines::processImage(Mat inputImage, CharacterRegion* charRegion, float
|
||||
getTime(&startTime);
|
||||
|
||||
// Copy the input image over to the "smoothed" image as grayscale
|
||||
Mat smoothed;
|
||||
cvtColor(inputImage, smoothed, CV_BGR2GRAY);
|
||||
Mat smoothed(inputImage.size(), inputImage.type());
|
||||
inputImage.copyTo(smoothed);
|
||||
|
||||
drawAndWait(&inputImage);
|
||||
// Ignore input images that are pure white or pure black
|
||||
Scalar avgPixelIntensity = mean(smoothed);
|
||||
if (avgPixelIntensity[0] == 255)
|
||||
|
Reference in New Issue
Block a user