diff --git a/src/misc_utilities/benchmark/benchmark.cpp b/src/misc_utilities/benchmark/benchmark.cpp index d09efce..eb1e3fa 100644 --- a/src/misc_utilities/benchmark/benchmark.cpp +++ b/src/misc_utilities/benchmark/benchmark.cpp @@ -232,7 +232,7 @@ int main( int argc, const char** argv ) double analysisTime = diffclock(startTime, endTime); cout << "\tRegion " << z << ": Analysis time: " << analysisTime << "ms." << endl; - if (lp.confidence > 10) + if (pipeline_data.plate_area_confidence > 10) { lpAnalysisPositiveTimes.push_back(analysisTime); diff --git a/src/openalpr/alpr_impl.cpp b/src/openalpr/alpr_impl.cpp index e79bbad..ae72216 100644 --- a/src/openalpr/alpr_impl.cpp +++ b/src/openalpr/alpr_impl.cpp @@ -196,7 +196,7 @@ void plateAnalysisThread(void* arg) lp.recognize(); - if (lp.confidence <= 10) + if (pipeline_data.plate_area_confidence <= 10) { // Not a valid plate // Check if this plate has any children, if so, send them back up to the dispatcher for processing diff --git a/src/openalpr/licenseplatecandidate.cpp b/src/openalpr/licenseplatecandidate.cpp index f318727..8058a0f 100644 --- a/src/openalpr/licenseplatecandidate.cpp +++ b/src/openalpr/licenseplatecandidate.cpp @@ -39,7 +39,7 @@ void LicensePlateCandidate::recognize() { charSegmenter = NULL; - this->confidence = 0; + pipeline_data->plate_area_confidence = 0; int expandX = round(this->pipeline_data->regionOfInterest.width * 0.20); int expandY = round(this->pipeline_data->regionOfInterest.height * 0.15); @@ -55,7 +55,6 @@ void LicensePlateCandidate::recognize() if (charRegion.confidence > 10) { PlateLines plateLines(config); - //Mat boogedy = charRegion.getPlateMask(); plateLines.processImage(pipeline_data->plate_mask, &charRegion, 1.10); plateLines.processImage(pipeline_data->crop_gray, &charRegion, 0.9); @@ -74,7 +73,7 @@ void LicensePlateCandidate::recognize() //this->recognizedText = ocr->recognizedText; //strcpy(this->recognizedText, ocr.recognizedText); - this->confidence = 100; + pipeline_data->plate_area_confidence = 100; } charRegion.confidence = 0; } diff --git a/src/openalpr/licenseplatecandidate.h b/src/openalpr/licenseplatecandidate.h index 6ec0c71..e64adee 100644 --- a/src/openalpr/licenseplatecandidate.h +++ b/src/openalpr/licenseplatecandidate.h @@ -46,8 +46,6 @@ class LicensePlateCandidate LicensePlateCandidate(PipelineData* pipeline_data); virtual ~LicensePlateCandidate(); - float confidence; // 0-100 - //vector points; // top-left, top-right, bottom-right, bottom-left void recognize(); diff --git a/src/openalpr/pipeline_data.h b/src/openalpr/pipeline_data.h index b403b10..6e21438 100644 --- a/src/openalpr/pipeline_data.h +++ b/src/openalpr/pipeline_data.h @@ -35,13 +35,11 @@ class PipelineData std::string region_code; float region_confidence; - float overall_confidence; + + float plate_area_confidence; std::vector charRegions; - // Plate Lines - std::vector horizontalLines; - std::vector verticalLines; diff --git a/src/openalpr/platecorners.cpp b/src/openalpr/platecorners.cpp index 453a930..bdec822 100644 --- a/src/openalpr/platecorners.cpp +++ b/src/openalpr/platecorners.cpp @@ -40,10 +40,6 @@ PlateCorners::PlateCorners(Mat inputImage, PlateLines* plateLines, CharacterRegi Point bottomPoint = charRegion->getBottomLine().closestPointOnSegmentTo(topPoint); this->charHeight = distanceBetweenPoints(topPoint, bottomPoint); - //this->charHeight = distanceBetweenPoints(charRegion->getCharArea()[0], charRegion->getCharArea()[3]); - //this->charHeight = this->charHeight - 2; // Adjust since this height is a box around our char. - // Adjust the char height for the difference in size... - //this->charHeight = ((float) inputImage.size().height / (float) TEMPLATE_PLATE_HEIGHT) * this->charHeight; this->charAngle = angleBetweenPoints(charRegion->getCharArea()[0], charRegion->getCharArea()[1]); }