Ask Your Question

Revision history [back]

Since you have the individual characters and you know their corresponding label (which is the actual OCR part) it should not be too hard to write them to a file. For lines you look at the coordinates of the bounding box, if the y dimension changes, a new line is started. If x is larger then a specific threshold, there is a space instead of a next letter. To output the data to a text file you can simply use the ofstream class of C++!

Yes, directly save the str pointer to text file by ofstream class.