# What is the best approach to classify an image containing either text or image?

I am doing a research about image-based User Interface (UI) Analysis, and while UI image-based analysis is not more complicated than normal image analysis, I was able to do a segmentation process to separate text, icon and picture in the UI.

However, my next step is to perform content classification on the segmented groups. The segmentation contains:

• text
• image or icon

So: what could be the best approach to classify an image containing either text or image?

The segment with text (I assume with a background) should contains text clearly visible from the background, then the text segment should have a lot of peaks in the transitions from text to background. The segment icon normally shouldn't have many peaks because in general there are few variations in an image. So if you make a stft of a part of a segment the text should have more harmonics than the icon. However if the icon is similar to the text or if it has many peaks this idea can't works. You can also find the color density, a single color text on a single color background has the color density concentrated in two points. This is only an idea and it must to be improved.