How can I define two tones in a grayscale image

조회 수: 2 (최근 30일)
Stelios Fanourakis
Stelios Fanourakis 2019년 5월 12일
댓글: Jan 2019년 5월 19일
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일
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
Stelios Fanourakis
Stelios Fanourakis 2019년 5월 19일
"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개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by