Merge pull request #106 from Kees-V/master

filterByOuterMask: Re-initialize mask for every contour to get a correct...
This commit is contained in:
Matthew Hill
2015-04-19 14:53:42 -04:00

View File

@@ -549,7 +549,8 @@ namespace alpr
totalChars++; totalChars++;
drawContours(tempFullContour, textContours.contours, i, Scalar(255,255,255), CV_FILLED, 8, textContours.hierarchy); tempFullContour = Mat::zeros(plateMask.size(), CV_8U);
drawContours(tempFullContour, textContours.contours, i, Scalar(255,255,255), CV_FILLED, 8, textContours.hierarchy);
bitwise_and(tempFullContour, plateMask, tempMaskedContour); bitwise_and(tempFullContour, plateMask, tempMaskedContour);
float beforeMaskWhiteness = mean(tempFullContour)[0]; float beforeMaskWhiteness = mean(tempFullContour)[0];