2

I have searched about this field and I found some papers that present new methods to extracting texts from images, but I have a grayscale image consists of a simple background and some texts.so I need a method that everyone works with it. please provide details on how this can be done.

Dima
  • 38,860
  • 14
  • 75
  • 115
top.eng
  • 1,828
  • 2
  • 13
  • 21
  • 1
    Maybe have a look to [this](http://stackoverflow.com/questions/19960826/how-to-make-the-blackboard-text-appear-clearer-using-matlab/19962240?noredirect=1#comment29743737_19962240) – Vuwox Nov 14 '13 at 16:18
  • [The article](http://www.math.tau.ac.il/~turkel/imagepapers/text_detection.pdf) – Vuwox Nov 14 '13 at 16:19
  • for example "Text detection and recognition in natural images" by Steven Bell that presents a method without performing segmentation. – top.eng Nov 14 '13 at 16:21
  • this article seems to be for natural images only but my images as i said have very simple background for example a red background with probably some noises. do you think this paper will help me? – top.eng Nov 14 '13 at 16:29
  • @top.eng You should try reading the paper describing the stroke width transform. If it works for complicated backgrounds it should work in your case as well. – user2469775 Nov 14 '13 at 16:44
  • 1
    If you look to the first link I send, the guys use this paper on a blackboard, as you, it a uniform background. Have a look closer, I don't know if it good for you or not. – Vuwox Nov 14 '13 at 16:44
  • 1
    @top.eng morover since you already have an implementation of SWT - why don't you just give it a try? – user2469775 Nov 14 '13 at 16:44
  • thank guys.I will read the paper... – top.eng Nov 14 '13 at 16:59

1 Answers1

2

Here an article about text segmentation.

the article

And here an easy way to segment your image in 2 class.

I = imread('...'); % Your board image
ThreshConstant = 1; % Try to vary this constant.

bw = im2bw(I , ThreshConstant * graythresh(I)); % Black-white image

SegmentedImg = I.*repmat(uint8(bw), [1 1 3]);

Just do imshow(bw); and you will have a 2 color image normally well segmented.

If the threshold is too strong, try to turn around 0.5 to 1.5 with ThreshConstant.

Vuwox
  • 2,331
  • 18
  • 33
  • I tried your answer for [this question](http://stackoverflow.com/users/2049859/top-eng?tab=reputation) and helped me. if you post it here i want to mark it as my answer. – top.eng Nov 14 '13 at 19:53
  • The BW or the SWT article ? Whatever, I Edit my answer – Vuwox Nov 14 '13 at 19:55
  • You're welcome. But this is a simple ostu 2-class segmentation. If you maybe look for more class segmentation. This [file exchange](http://www.mathworks.com/matlabcentral/fileexchange/26532-image-segmentation-using-otsu-thresholding) is really good. – Vuwox Nov 14 '13 at 20:01