{"action":"opened","issue":{"url":"https://api.github.com/repos/gali8/Tesseract-OCR-iOS/issues/228","labels_url":"https://api.github.com/repos/gali8/Tesseract-OCR-iOS/issues/228/labels{/name}","comments_url":"https://api.github.com/repos/gali8/Tesseract-OCR-iOS/issues/228/comments","events_url":"https://api.github.com/repos/gali8/Tesseract-OCR-iOS/issues/228/events","html_url":"https://github.com/gali8/Tesseract-OCR-iOS/issues/228","id":112132980,"number":228,"title":"characterChoices returns empty elements","user":{"login":"tedde","id":1453778,"avatar_url":"https://avatars.githubusercontent.com/u/1453778?v=3","gravatar_id":"","url":"https://api.github.com/users/tedde","html_url":"https://github.com/tedde","followers_url":"https://api.github.com/users/tedde/followers","following_url":"https://api.github.com/users/tedde/following{/other_user}","gists_url":"https://api.github.com/users/tedde/gists{/gist_id}","starred_url":"https://api.github.com/users/tedde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tedde/subscriptions","organizations_url":"https://api.github.com/users/tedde/orgs","repos_url":"https://api.github.com/users/tedde/repos","events_url":"https://api.github.com/users/tedde/events{/privacy}","received_events_url":"https://api.github.com/users/tedde/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-19T12:21:06Z","updated_at":"2015-10-19T12:21:06Z","closed_at":null,"body":"I am reading the mrz of id cards/passports - most of the time the OCR is perfect but sometimes I would like to iterate over the choices in order to fix errors. However for some images there are choices missing, as far as I've seen always one full row. Why? Am I doing it wrong? Or is it a bug?\r\n\r\nin the example below the first row of the image does not return any choices at all\r\n\r\n![1](https://cloud.githubusercontent.com/assets/1453778/10577389/2f78984c-766b-11e5-9791-61a79165e3b0.jpg)\r\nusing the following code\r\n```objectivec\r\n    G8RecognitionOperation *operation = [[G8RecognitionOperation alloc] initWithLanguage:@\"eng\"];\r\n    operation.tesseract.engineMode = G8OCREngineModeTesseractOnly;\r\n    operation.tesseract.pageSegmentationMode = G8PageSegmentationModeAutoOnly;\r\n    [operation.tesseract setVariableValue:@\"ABCDEFGHIJKLMNOPQRSTUVWXYZ<0123456789\" forKey:@\"tessedit_char_whitelist\"];\r\n    [operation.tesseract setVariableValue:@\"T\" forKey:@\"assume_fixed_pitch_char_segment\"];\r\n    operation.tesseract.image = &bwImage;\r\n    operation.tesseract.recognize;\r\n    NSArray *a = operation.tesseract.characterChoices;\r\n    NSLog(@\"%@\", a); \r\n    NSLog(@\"RECOGNISED= %@\" , [operation.tesseract recognizedText]);\r\n```\r\nOutput\r\n```\r\n(\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n    ),\r\n        (\r\n        \"(81.30%) '8'\"\r\n    ),\r\n        (\r\n        \"(82.51%) '0'\",\r\n        \"(75.10%) 'B'\",\r\n        \"(71.87%) 'O'\",\r\n        \"(71.62%) 'Q'\",\r\n        \"(71.30%) 'C'\",\r\n        \"(68.84%) 'G'\"\r\n    ),\r\n        (\r\n        \"(89.18%) '1'\"\r\n    ),\r\n        (\r\n        \"(85.36%) '0'\",\r\n        \"(77.56%) 'O'\"\r\n    ),\r\n        (\r\n        \"(86.12%) '1'\"\r\n    ),\r\n        (\r\n        \"(81.99%) '0'\",\r\n        \"(74.86%) 'O'\",\r\n        \"(70.67%) 'Q'\",\r\n        \"(68.59%) 'B'\",\r\n        \"(68.47%) 'C'\"\r\n    ),\r\n        (\r\n        \"(85.11%) '0'\",\r\n        \"(76.91%) 'O'\",\r\n        \"(71.51%) 'Q'\"\r\n    ),\r\n        (\r\n        \"(94.15%) 'M'\"\r\n    ),\r\n        (\r\n        \"(88.53%) '1'\"\r\n    ),\r\n        (\r\n        \"(85.22%) '7'\"\r\n    ),\r\n        (\r\n        \"(80.44%) '0'\",\r\n        \"(76.15%) 'O'\",\r\n        \"(69.74%) 'Q'\",\r\n        \"(69.29%) 'C'\",\r\n        \"(67.53%) 'B'\"\r\n    ),\r\n        (\r\n        \"(88.68%) '2'\"\r\n    ),\r\n        (\r\n        \"(85.94%) '0'\",\r\n        \"(75.14%) 'B'\",\r\n        \"(71.71%) 'O'\"\r\n    ),\r\n        (\r\n        \"(76.29%) '9'\"\r\n    ),\r\n        (\r\n        \"(89.28%) '1'\"\r\n    ),\r\n        (\r\n        \"(94.65%) 'E'\"\r\n    ),\r\n        (\r\n        \"(86.10%) 'S'\",\r\n        \"(77.95%) '5'\"\r\n    ),\r\n        (\r\n        \"(92.35%) 'T'\"\r\n    ),\r\n        (\r\n        \"(81.21%) '<'\"\r\n    ),\r\n        (\r\n        \"(76.13%) '<'\"\r\n    ),\r\n        (\r\n        \"(83.40%) '<'\"\r\n    ),\r\n        (\r\n        \"(85.28%) '<'\"\r\n    ),\r\n        (\r\n        \"(85.74%) '<'\"\r\n    ),\r\n        (\r\n        \"(83.62%) '<'\"\r\n    ),\r\n        (\r\n        \"(83.62%) '<'\"\r\n    ),\r\n        (\r\n        \"(81.84%) '<'\"\r\n    ),\r\n        (\r\n        \"(80.28%) '<'\"\r\n    ),\r\n        (\r\n        \"(82.61%) '<'\"\r\n    ),\r\n        (\r\n        \"(85.72%) '<'\"\r\n    ),\r\n        (\r\n        \"(91.66%) '2'\"\r\n    ),\r\n        (\r\n        \"(82.86%) 'S'\",\r\n        \"(79.72%) '5'\"\r\n    ),\r\n        (\r\n        \"(87.99%) 'P'\"\r\n    ),\r\n        (\r\n        \"(90.25%) 'E'\",\r\n        \"(75.38%) 'B'\"\r\n    ),\r\n        (\r\n        \"(73.48%) 'C'\",\r\n        \"(63.71%) 'E'\"\r\n    ),\r\n        (\r\n        \"(85.36%) 'I'\"\r\n    ),\r\n        (\r\n        \"(92.14%) 'M'\"\r\n    ),\r\n        (\r\n        \"(92.45%) 'E'\"\r\n    ),\r\n        (\r\n        \"(93.64%) 'N'\",\r\n        \"(79.42%) 'M'\"\r\n    ),\r\n        (\r\n        \"(73.11%) '<'\"\r\n    ),\r\n        (\r\n        \"(72.99%) '<'\"\r\n    ),\r\n        (\r\n        \"(90.35%) 'A'\"\r\n    ),\r\n        (\r\n        \"(86.72%) 'N'\"\r\n    ),\r\n        (\r\n        \"(92.94%) 'D'\"\r\n    ),\r\n        (\r\n        \"(85.07%) 'R'\"\r\n    ),\r\n        (\r\n        \"(94.44%) 'E'\"\r\n    ),\r\n        (\r\n        \"(88.69%) 'W'\"\r\n    ),\r\n        (\r\n        \"(83.70%) '<'\"\r\n    ),\r\n        (\r\n        \"(80.63%) '<'\"\r\n    ),\r\n        (\r\n        \"(75.83%) '<'\"\r\n    ),\r\n        (\r\n        \"(81.21%) '<'\"\r\n    ),\r\n        (\r\n        \"(84.20%) '<'\"\r\n    ),\r\n        (\r\n        \"(84.55%) '<'\"\r\n    ),\r\n        (\r\n        \"(83.27%) '<'\"\r\n    ),\r\n        (\r\n        \"(83.06%) '<'\"\r\n    ),\r\n        (\r\n        \"(81.36%) '<'\"\r\n    ),\r\n        (\r\n        \"(81.34%) '<'\"\r\n    ),\r\n        (\r\n        \"(78.78%) '<'\"\r\n    ),\r\n        (\r\n        \"(80.69%) '<'\"\r\n    ),\r\n        (\r\n        \"(85.49%) '<'\"\r\n    ),\r\n        (\r\n        \"(82.61%) '<'\"\r\n    )\r\n)\r\n\r\nIELVAEA99907431101080<88884<<<\r\n8010100M1702091EST<<<<<<<<<<<2\r\nSPECIMEN<<ANDREW<<<<<<<<<<<<<<\r\n````"}}