How to remove a red text from a greyscale image?!

조회 수: 2 (최근 30일)
Mariam Sheha
Mariam Sheha 2016년 4월 4일
댓글: Mariam Sheha 2016년 4월 8일
Hello my friends;
hope you are all doing well,,
i'd like to ask how can i segment or remove a red text from grey scal image?!
i think about making a for loop and if condition so that if found the red color (1,0,0) will convert it to white but it doesn't work?! can you please check that with me or tell me about another solution for that! (i am using matlab 7.10)
example of the image i am talking about is attached!

채택된 답변

Walter Roberson
Walter Roberson 2016년 4월 4일
Convert to HSV. The range of hues for the red will be very different than the range of hues for the grayscale.
Now, take one pane of the image, and double() it. Use the locations where red were detected and assign NaN to the array just mentioned. Now you can use John D'Errico's inpaint_nan File Exchange Contribution.
  댓글 수: 1
Mariam Sheha
Mariam Sheha 2016년 4월 8일
Thanks A lot it works out and your idea also guided ne out to work out with the R component of the RGB image and it also works when subtracting from the RGB image...
Now i want to ask about completing my task to inprint image ...i segment it out and then added low pass filter gaussian and now i want to remove the blurred pixels replacing it by the known correct one .....how do you think i can do that?! The code is attached

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by