MATLAB: How to display unique characters

bounding boxesculsteringImage Processing Toolboxocr

I want to create a prototype which contains all the characters present in the image. But the condition is that repeating characters should be displayed only once. Can I get a code for this.
  • for example if in a image character "t" occurs multiple times it should be displayed once in the prototype
  • please do give me a matlab code to display the prototype image
  1. I have attached the code file("doc1.txt") please help me to proceed.
………………. Please help me out to eliminate repeating characters from the image.
I want the output something like this " t e x p u b l i s h n g " >>>>>>>>>in image format

Best Answer

What I would do is to threshold and label all the character blobs in your image. Then use regionprops() to measure the centroid and things like area, Euler number, solidity. Then see if there are any duplicates of the things (other than the centroid of course). If there is a match, remove duplicates by overwriting the label with 0 in the labeled image. Use the x centroid to determine which is the first (left most) blob.