Matlab edge detection - of text!

after a lot of tryouts with different filters i have yet to accomplish getting a black and white image of the picture above.
I would like to have the text as readable as possible but using the 'log' filter is just not enough mixed with imadjust and midfilters
while the others doesnt help at all ,
could use a suggestion , thanks

댓글 수: 1

John Petersen
John Petersen 2012년 11월 29일
The image looks very clean and not too noisy. Can you try dividing the image into squares and taking the mean of the square. Reassign pixels that are a threshold above the mean to black and below a threshold from the mean to white. You would have to decide the size of square and threshold level.

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2012년 11월 29일

0 개 추천

You might want to try getting rid of the background gradient and maximize contrast by using CLAHE (contrast limited, locally adaptive histogram equalization), accomplished by the function "adapthisteq()" in the Image Processing Toolbox.

댓글 수: 5

Despairy
Despairy 2012년 11월 30일
I've looked into the function manual and it actually did increase the contrast , but didnt exactly got rid of the gradient. Still it was much easier to see the text. But, I'm still having problems getting the edges of the text only so it would be still as readable as after the use of CLAHE. this is the result so far
Image Analyst
Image Analyst 2012년 11월 30일
Not bad so far. There's some noise to clean up. Can probably get some of that by using bwareaopen() or trying to detect lines of text by summing horizontally. I don't really know OCR algorithms so I'm not sure why you want only the edges of the characters and not the whole character. How can that be an improvement? If these some OCR algorithm that you're trying to follow that wants only the edges? If so, have you tried thresholding and then using bwboundaries() or bwperim()?
Despairy
Despairy 2012년 11월 30일
Well I'm not trying to implement some kind of OCR algorithm, I just need the text to be shown clearly. I thought of doing so using edges detection, but if there is any other (better) way I don't mind giving a shot.
Image Analyst
Image Analyst 2012년 11월 30일
Why is the image so bad in the first place? Can't you obtain better images with more uniform illumination? How about using a scanner, or a nice light booth with flood illumination and the inside painted all white?
Despairy
Despairy 2012년 11월 30일
Well it is an exercise for trying to get the best of it which I can't seem to succeed. maybe a different approach would do.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Convert Image Type에 대해 자세히 알아보기

질문:

2012년 11월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by