Hi
I have an ultrasound image with lots of gray tones. I want to threshold the image by defining two of its tones. The higher intensity (white tone) and the lowest intensity (darkest gray tone). All other tones in the middle should be eliminated.
How can I do this?
Thanks

 채택된 답변

Jan
Jan 2019년 5월 17일
편집: Jan 2019년 5월 19일

2 개 추천

You cannot eliminate colors in a gray-scale image, but only set them to another value.
img(img > 67 & img < 128) = 0;
Here all gray scale values between 68 and 127 are set to 0.

댓글 수: 3

(+1) = Short and very efficient solution!
"Here all gray scale values between 64 and 127 are set to 0."
You mean values between 68 and 127 are set to 0
Jan
Jan 2019년 5월 19일
@Stelios: Correct. This was a typo.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Biomedical Imaging에 대해 자세히 알아보기

질문:

2019년 5월 12일

댓글:

Jan
2019년 5월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by