remove background and increase the contrast

조회 수: 2 (최근 30일)
Kasmayanti Sakaria
Kasmayanti Sakaria 2018년 5월 18일
댓글: Kasmayanti Sakaria 2018년 5월 21일
Hi everyone,
I am having a problem with my images. I have no idea on how to remove the background (grey color) and increase the contrast of gap (black one). Attached the image.
Could anyone please help me to solve my problem.
Thank you in advance :)

채택된 답변

Guillaume
Guillaume 2018년 5월 18일
편집: Guillaume 2018년 5월 18일
For the contrast, have you tried imadjust?
For the background, typically, you record a background image that you then subtract from your test images (for dark background). In your case, however, you could simply threshold the image. Assuming that your image is uint8, does
yourimage(yourimage > 127) = 255;
work for you?
However, if you're going to binarise your image, then you don't need to adjust the contrast or play around with the background,
imbinarize(yourimage)
should isolate the black from the background.
  댓글 수: 1
Kasmayanti Sakaria
Kasmayanti Sakaria 2018년 5월 21일
Yeah. Thanks, it is works as I want. I did binarisation. But my problem now, I want to fill in with '1' at the black region (image attached above). Will make a new post for this question. Btw, thank you again for your help :)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by