mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 12:16:54 +08:00
Fixed errors in classifychars
This commit is contained in:
@@ -125,6 +125,8 @@ int main( int argc, const char** argv )
|
|||||||
imshow ("Original", frame);
|
imshow ("Original", frame);
|
||||||
|
|
||||||
PipelineData pipeline_data(frame, Rect(0, 0, frame.cols, frame.rows), &config);
|
PipelineData pipeline_data(frame, Rect(0, 0, frame.cols, frame.rows), &config);
|
||||||
|
cvtColor(frame, frame, CV_BGR2GRAY);
|
||||||
|
pipeline_data.crop_gray = Mat(frame, Rect(0, 0, frame.cols, frame.rows));
|
||||||
char statecode[3];
|
char statecode[3];
|
||||||
statecode[0] = files[i][0];
|
statecode[0] = files[i][0];
|
||||||
statecode[1] = files[i][1];
|
statecode[1] = files[i][1];
|
||||||
@@ -197,11 +199,18 @@ int main( int argc, const char** argv )
|
|||||||
showDashboard(pipeline_data.thresholds, selectedBoxes, curDashboardSelection);
|
showDashboard(pipeline_data.thresholds, selectedBoxes, curDashboardSelection);
|
||||||
}
|
}
|
||||||
else if (waitkey == ENTER_KEY)
|
else if (waitkey == ENTER_KEY)
|
||||||
|
{
|
||||||
|
if (pipeline_data.charRegions.size() > 0)
|
||||||
{
|
{
|
||||||
vector<char> tempdata = showCharSelection(pipeline_data.thresholds[curDashboardSelection], pipeline_data.charRegions, statecodestr);
|
vector<char> tempdata = showCharSelection(pipeline_data.thresholds[curDashboardSelection], pipeline_data.charRegions, statecodestr);
|
||||||
for (int c = 0; c < pipeline_data.charRegions.size(); c++)
|
for (int c = 0; c < pipeline_data.charRegions.size(); c++)
|
||||||
humanInputs[c] = tempdata[c];
|
humanInputs[c] = tempdata[c];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cout << "No character regions available in this image" << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (waitkey == SPACE_KEY)
|
else if (waitkey == SPACE_KEY)
|
||||||
{
|
{
|
||||||
selectedBoxes[curDashboardSelection] = !selectedBoxes[curDashboardSelection];
|
selectedBoxes[curDashboardSelection] = !selectedBoxes[curDashboardSelection];
|
||||||
|
Reference in New Issue
Block a user