Separate red tumor from image by using RGB

1 次查看(过去 30 天)
I have to separate red tumor from the image by using thresholding approach while creating the mask I found some functions related to it but I didn't run the codes. I just wrote that and the image is there:
clear all;clc
a=imread('mri_img.png');
imshow(a);
red=a(:,:,1);
green=a(:,:,2);
blue=a(:,:,3);
subplot(2,2,1),imshow(a)
subplot(2,2,2),imshow(red)
subplot(2,2,3),imshow(green)
subplot(2,2,4),imshow(blue)
newcg=green>70;
newcb=blue<30;
newcg=~newcg;
MaskImage =newcg&newcb;
MaskImage = double(MaskImage);

采纳的回答

Image Analyst
Image Analyst 2019-11-3
Is the image a simple pseudocolor of a grayscale image? If so, do you have the original image? Or do the colors represent something different than grayscale?
Please see my attached demos.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Read, Write, and Modify Image 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by