![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/966605/image.jpeg)
How to make the grey area completely black, so it's a binary image?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I have a grayscale tumor image like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/966480/image.bmp)
I want to make the grey area complely dark, something like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/966485/image.png)
(This is a mask for another image)
so that the white area remailns white, but the grey area goes dark. Is it possible?
댓글 수: 0
채택된 답변
추가 답변 (1개)
DGM
2022년 4월 16일
The mask that was used to create the hole in the image is the binarized image. You shouldn't need to turn the source image into a copy of the mask.
but if you must:
A = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/966480/image.bmp');
A(A<255) = 0;
imshow(A)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!