Create an image of a given text character

11 views (last 30 days)
I'm wondering if anyone knows of an easy programmatic way in MATLAB to create images of a given text character.The image below of the number three, I created by cropping and resizing a screenshot, which involved a fair amount of manual work, and I'm looking for a more automated way.
I have to believe that there is a ready-to-go way to do this. A tool like that would have obvious applications in template matching and the testing of character recognition algorithms.

Accepted Answer

Image Analyst
Image Analyst on 8 Oct 2015
There's an insertText function in the Computer Vision System Toolbox. Do you have that?
Alternatively, use the text() function to create the text in the overlay, then use export_fig to save the axes as an image.
  1 Comment
Matt J
Matt J on 8 Oct 2015
Thanks. I suppose that is the way to go, though I was hoping there might be a way that spares me the effort of setting up the overlay. It requires positioning/sizing of both the text and the background pixel grid...

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!