How to display characters on image properly?

1 次查看(过去 30 天)
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

采纳的回答

Image Analyst
Image Analyst 2015-7-10
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 个评论
Image Analyst
Image Analyst 2015-7-11
编辑:Image Analyst 2015-7-11
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 2015-7-11
OK now I'll try to make a better looking image first...thanks

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Biomedical Imaging 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by