How to display characters on image properly?

4 views (last 30 days)
I have a sample image, on which "speed" is written with pencil and then erased it completely...I need to display the image in binary format with black background and white characters, having characters properly displayed...can any one help...pls tell me any method at least that I should follow

Accepted Answer

Image Analyst
Image Analyst on 10 Jul 2015
I'd probably try a tophat or bottomhat filter. They're in the help for the Image Processing Toolbox. Or you could try stdfilt().
  8 Comments
Image Analyst
Image Analyst on 11 Jul 2015
Edited: Image Analyst on 11 Jul 2015
peyush, of course I know it's your project. But it's always better to start with a good image than to try to fix up a bad image before you can even start the main processing. So what I'm saying is, if it's an important project you will do things to get a good image. Like try a profilometer. Or try multispectral imaging. Or try fluorescent imaging? Did you know that most white paper has fluorescent whitening agents (optical brighteners) in it whereas pencil lead and ink probably don't? Have you tried using a "black light" to take a photo? This should make the paper brighter and give more contrast with the writing.
These are the kinds of things a professional engineer would try. We need to look at all possible solutions - not just go with the first thing we think of.
I'm not saying that it can't be done, but it would be SO much easier if you had a good image to start with. For example, you can use sophisticated noise reduction methods like BM3D or non-local means. Did you try anisotropic diffusion or Gabor filters (often used in fingerprint processing)? If so, how did they work. If not, why not?
Why don't you try a Hessian filter like is used to track vessels and fibers, like a Frangi filter: http://www.mathworks.com/matlabcentral/fileexchange/24409-hessian-based-frangi-vesselness-filter?
The anisotropic diffusion demo I attached works perfectly fine. What you did was to paste that in at the bottom of your script. You can't have a function follow a script in the same m-file. You can have two functions though. So if your script is called test.m then you need to have this as the first line of code in test.m
function test()
Then, later on down the file you can have the anisotropic diffusion function. Be sure to alter it so that it uses your image instead of the demo images.
peyush
peyush on 11 Jul 2015
OK now I'll try to make a better looking image first...thanks

Sign in to comment.

More Answers (0)

Categories

Find more on Biomedical Imaging in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!