mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 07:16:56 +08:00
Fixed state identification missing from output
This commit is contained in:
@@ -300,6 +300,8 @@ bool detectandshow( Alpr* alpr, cv::Mat frame, std::string region, bool writeJso
|
||||
std::cout << " -- Processing Time = " << results.plates[i].processing_time_ms << "ms.";
|
||||
std::cout << std::endl;
|
||||
|
||||
if (results.plates[i].regionConfidence > 0)
|
||||
std::cout << "State ID: " << results.plates[i].region << " (" << results.plates[i].regionConfidence << "% confidence)" << std::endl;
|
||||
|
||||
for (int k = 0; k < results.plates[i].topNPlates.size(); k++)
|
||||
{
|
||||
|
@@ -139,11 +139,11 @@ AlprFullDetails AlprImpl::recognizeFullDetails(cv::Mat img, std::vector<cv::Rect
|
||||
|
||||
if (detectRegion)
|
||||
{
|
||||
char statecode[4];
|
||||
plateResult.regionConfidence = stateIdentifier->recognize(&pipeline_data);
|
||||
if (plateResult.regionConfidence > 0)
|
||||
stateIdentifier->recognize(&pipeline_data);
|
||||
if (pipeline_data.region_confidence > 0)
|
||||
{
|
||||
plateResult.region = statecode;
|
||||
plateResult.region = pipeline_data.region_code;
|
||||
plateResult.regionConfidence = (int) pipeline_data.region_confidence;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -288,6 +288,7 @@ RecognitionResult FeatureMatcher::recognize( const Mat& queryImg, bool drawOnIma
|
||||
RecognitionResult result;
|
||||
|
||||
result.haswinner = false;
|
||||
result.confidence = 0;
|
||||
|
||||
Mat queryDescriptors;
|
||||
vector<KeyPoint> queryKeypoints;
|
||||
|
@@ -11,6 +11,8 @@ PipelineData::PipelineData(Mat colorImage, Rect regionOfInterest, Config* config
|
||||
this->regionOfInterest = regionOfInterest;
|
||||
this->config = config;
|
||||
|
||||
this->region_confidence = 0;
|
||||
|
||||
plate_inverted = false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user