Removed redundant variable

This commit is contained in:
Matt Hill
2014-07-01 19:02:53 -04:00
parent 0708523131
commit c8f52ccb48
2 changed files with 7 additions and 8 deletions

View File

@@ -161,9 +161,9 @@ int main( int argc, const char** argv )
int curDashboardSelection = 0; int curDashboardSelection = 0;
vector<char> humanInputs(charSegmenter.characters.size()); vector<char> humanInputs(pipeline_data.charRegions.size());
for (int z = 0; z < charSegmenter.characters.size(); z++) for (int z = 0; z < pipeline_data.charRegions.size(); z++)
humanInputs[z] = ' '; humanInputs[z] = ' ';
showDashboard(pipeline_data.thresholds, selectedBoxes, 0); showDashboard(pipeline_data.thresholds, selectedBoxes, 0);
@@ -198,8 +198,8 @@ int main( int argc, const char** argv )
} }
else if (waitkey == ENTER_KEY) else if (waitkey == ENTER_KEY)
{ {
vector<char> tempdata = showCharSelection(pipeline_data.thresholds[curDashboardSelection], charSegmenter.characters, statecodestr); vector<char> tempdata = showCharSelection(pipeline_data.thresholds[curDashboardSelection], pipeline_data.charRegions, statecodestr);
for (int c = 0; c < charSegmenter.characters.size(); c++) for (int c = 0; c < pipeline_data.charRegions.size(); c++)
humanInputs[c] = tempdata[c]; humanInputs[c] = tempdata[c];
} }
else if (waitkey == SPACE_KEY) else if (waitkey == SPACE_KEY)
@@ -227,7 +227,7 @@ int main( int argc, const char** argv )
break; break;
} }
} }
for (int c = 0; c < charSegmenter.characters.size(); c++) for (int c = 0; c < pipeline_data.charRegions.size(); c++)
{ {
if (humanInputs[c] != ' ') if (humanInputs[c] != ' ')
{ {
@@ -238,7 +238,7 @@ int main( int argc, const char** argv )
// Save // Save
if (somethingSelected && chardataTagged) if (somethingSelected && chardataTagged)
{ {
for (int c = 0; c < charSegmenter.characters.size(); c++) for (int c = 0; c < pipeline_data.charRegions.size(); c++)
{ {
if (humanInputs[c] == ' ') if (humanInputs[c] == ' ')
continue; continue;
@@ -249,7 +249,7 @@ int main( int argc, const char** argv )
continue; continue;
stringstream filename; stringstream filename;
Mat cropped = pipeline_data.thresholds[t](charSegmenter.characters[c]); Mat cropped = pipeline_data.thresholds[t](pipeline_data.charRegions[c]);
filename << outDir << "/" << humanInputs[c] << "-" << t << "-" << files[i]; filename << outDir << "/" << humanInputs[c] << "-" << t << "-" << files[i];
imwrite(filename.str(), cropped); imwrite(filename.str(), cropped);
cout << "Writing char image: " << filename.str() << endl; cout << "Writing char image: " << filename.str() << endl;

View File

@@ -47,7 +47,6 @@ class CharacterSegmenter
CharacterSegmenter(PipelineData* pipeline_data); CharacterSegmenter(PipelineData* pipeline_data);
virtual ~CharacterSegmenter(); virtual ~CharacterSegmenter();
std::vector<cv::Rect> characters;
int confidence; int confidence;