How can I define two tones in a grayscale image

1 次查看(过去 30 天)
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.

更多回答(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