How to display characters on image properly?
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
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
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
peyush
2015년 7월 10일
it's not working out properly...can you please suggest me any other method and thanks for your reply

You might try anisotropic diffusion or Gabor filtering.
stdfilt with thresholding shows promise (bw = stdfilt(img,ones(9))>4;)
Is this a student project, or a real problem? Because there are forensic methods to detect writing on pads of paper, like if someone wrote something on a Post-it note and peeled it away and took it. You can tell what they wrote by looking at the depressions on the remaining paper underneath the one they wrote on with a "profilometer" which essentially gives a topographic image. They are expensive instruments but if it's needed for your company or research grant, you could get one.
@Image Analyst...it is a part of my project and i need to recognise it automatically by using matlab...and while working with the script it is showing error... function anisotropic_diffusion() | Error: Function definitions are not permitted in this context.
how could i define the function...and thanks for your reply
@Ashish Uthama...i used stdfilt with thresholding and characters have got breaks with noise around

thanks for your reply
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
2015년 7월 11일
OK now I'll try to make a better looking image first...thanks
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Image Filtering에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
