Since texts which are added to the images contain important information, extraction of these texts is an important issue. In the proposed approach, first some preprocessing operations are performed to transform original image to an image with a few number of gray levels, in which computational costs is reduced for extracting texts. Then a number is assigned to each connected component, and some corrections with consideration to the text and character properties are performed. With these operations texts are extracted somedeal. In the next stage some proper processing are used to eliminate noises. Then with this knowledge that in the texts, characters lay in a direction regularly, some of wrongly text detected areas are eliminated and finally with a proper technique this approach is adapted to the size of texts and characters.