how to get clear text

I have a image below which is a cropped one ,i want to make the background black in colour and text text,i used some code,but am not getting clear image.I changed the values,even though could not get clear image
imgGray = rgb2gray(img_crop);
bw = im2bw(img_crop,graythresh(imgGray));
imshow(bw);
plz assist how to get clear text

답변 (1개)

Jan
Jan 2013년 2월 12일

0 개 추천

It is impossible to guess why your text get unclear by this procedure. Perhaps posting the picture helps to understand your problem.
Converting the image from RGB to GREY removes useful information from the image. I you want to identify a certain feature, here the text, using the color information could be important. Therefore I suggest not to use IM2BW(IM2GRAY(Image)), but to let one of Image Analysts frequently posted methods to find the speficic color of the text letters in the RGB image. The found mask will be an BW image also.

댓글 수: 11

Pat
Pat 2013년 2월 12일
ok can you tell what method is that .i need the text as to be like this
plz assist
Pat
Pat 2013년 2월 12일
Jan
Jan 2013년 2월 12일
As usual I cannot see any picture at the posted links. Should I have to dig through any commercials, hit a download button and open the file locally? This is very inconvenient.
You ask me for a method to select the color of the text. I've mentioned already that e.g. Image Analyst has explained them repeatedly in this forum. Look in the FileExchange also. It would not be efficient, if I do the searching for you and post the links here, Pat.
Pat
Pat 2013년 2월 12일
here is another link for images
imgur.com/y63Dlu2,Gt8XDJG
Jan
Jan 2013년 2월 12일
Is this a gaptcha and do you want to crack it??
Pat
Pat 2013년 2월 12일
I did not get what u have said
Jan
Jan 2013년 2월 12일
The picture looks like a gaptcha: a short string, which is readable by human, but very hard to recognize by OCR.
I cannot imagine a resaon, why such a noisy picture should be read by a computer, although human are magnitudes better for this job. Could please explain what this is useful for?
Pat
Pat 2013년 2월 12일
ya as you said i have to recognise it using OCR,i had two such images one clear and other noisy , i have to give comparison,i completed the image without noise,but struggling with this image
ChristianW
ChristianW 2013년 2월 12일
Dodging questions. :)
If thats gaptcha, its easy to crack.
Pat
Pat 2013년 2월 12일
can u tell how?
Jan
Jan 2013년 2월 12일
@ChristianW: All Gaptchas are easy to crack: Simply set up a server and offer anything for free, but add a gaptcha copied from the service you want to misuse. Then voluntary users solve the problem with their enormous visual inteligence, while even high skilled functions for image analysis fail. To demontrate this technique:
The image contains the string CLIE620020
And I even do not have the image processing toolbox!

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

카테고리

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

태그

질문:

Pat
2013년 2월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by