Fixed navigation issue in classifychars

This commit is contained in:
Matt Hill
2015-06-01 22:27:11 -04:00
parent 4b6d2cc6ec
commit d84058b327

View File

@@ -331,10 +331,15 @@ vector<string> showCharSelection(Mat image, vector<Rect> charRegions, string sta
imshow("Character selector", imgCopy); imshow("Character selector", imgCopy);
if (waitkey == LEFT_ARROW_KEY) if ((char) waitkey == LEFT_ARROW_KEY)
curCharIdx--; curCharIdx--;
else if (waitkey == RIGHT_ARROW_KEY ) else if ((char) waitkey == RIGHT_ARROW_KEY)
curCharIdx++; curCharIdx++;
else if (waitkey == SPACE_KEY)
{
humanInputs[curCharIdx] = " ";
curCharIdx++;
}
else if (waitkey > 0 && regex_rule.match(utf8chr(waitkey))) // Verify that it's an actual character else if (waitkey > 0 && regex_rule.match(utf8chr(waitkey))) // Verify that it's an actual character
{ {
// Save the character to disk // Save the character to disk