# Re sizing and thresholding small font scanned Arabic words

I am working on an arabic OCR for printed scanned documents ... Some of the scanned documents may written with font size of height 8 which is quite small ... I want to resize the height to 60 pixels but some artifacts may occur due to nature of arabic characters .. some characters may overlap .I had used local thresholding methods after resizing but the results are still not acceptable ... any ideas ?

This is an example image:

This is the same example after resizing and applying local adaptive thresholding using 50 as a window size:

As you can see there are some discontinuities in some characters like this one :

Is there is any method to resize the image while preserving textual shape ?

My approach to fix characters discontinuities :

• Threshold original image before resizing using local adaptive threshold using window size of 16 (this will solve characters discontinuities but the holes in the characters are filled) call it smallbw.

• Resize smallbw using imresize(smallbw, [nh nw], 'nearest') and fill the holes in characters using imfill

• Resize the original image to height 60 pixels using imresize(originalIm, [nh nw], 'nearest') call it largebw

• Fill holes in largebw using imfill and call it bwfill

• Extract holes from largebw by bwholes = bwfill - largebw

• Finally, subtract bwholes from smallbw to get this

you can see here that the discontinuity found in the character @Image 3 has been solved ... but there is another problem raised here some characters may overlap as shown here

This is the best results I could achieve so far ... are there any other ideas that may solve these issues ?? and if you think this issue has no solution how would I resolve it rather than using resizing? what about using 12 font size text instead of 8?

Operating system : windows 7

Programming environment : Matlab 2013a - Image Processing toolbox

• Cross-post on stackoverflow – mbschenkel Feb 28 '15 at 12:15
• @mbschenkel I know that sir .. I did this because they advised me to post it here on dsp.stackexchange – Ibrahim Amer Feb 28 '15 at 22:08
• I know that from the comments there. The official policy is to have a moderator migrate your question to a different site or to delete it and re-ask. But as long as it exists on both sites, a user comming across it on one, might not be aware of it on the other and potentially misses out on a good answer. That's why I put a link here and there. – mbschenkel Mar 1 '15 at 20:33