Calls #LearnWord to extract features for labelled blobs within each word. Features are stored in an internal buffer.
| 794 | /// Calls #LearnWord to extract features for labelled blobs within each word. |
| 795 | /// Features are stored in an internal buffer. |
| 796 | void Tesseract::ApplyBoxTraining(const STRING& fontname, PAGE_RES* page_res) { |
| 797 | PAGE_RES_IT pr_it(page_res); |
| 798 | int word_count = 0; |
| 799 | for (WERD_RES *word_res = pr_it.word(); word_res != NULL; |
| 800 | word_res = pr_it.forward()) { |
| 801 | LearnWord(fontname.string(), word_res); |
| 802 | ++word_count; |
| 803 | } |
| 804 | tprintf("Generated training data for %d words\n", word_count); |
| 805 | } |
| 806 | |
| 807 | |
| 808 | } // namespace tesseract |