Color based segment ? extract all color object ?
Show older comments
Color based segment ? extract all color object ? 

3 Comments
KALYAN ACHARJYA
on 6 Feb 2021
How you define color here?
Selva Karna
on 6 Feb 2021
Selva Karna
on 6 Feb 2021
Accepted Answer
More Answers (1)
KALYAN ACHARJYA
on 6 Feb 2021
As the color is always subjective. Considering the simmilar images (image modalities), you may get the respective color models easily in YCBCR color model. Here I have shown the code (hard thresholding) for red object only, hope you can replicate the same for others coloers objects
rgb_data=imread('color_test.png');
temp=rgb_data;
ycbcr_data=rgb2ycbcr(rgb_data);
% Red Object
mask_red=ycbcr_data(:,:,3)>140 & ycbcr_data(:,:,2)<130;
mask_red=cat(3,mask_red,mask_red,mask_red);
red_object=temp.*uint8(mask_red);
imshow(red_object);

Otherwise, you may have look for Semantic image segmentation using deep learning
1 Comment
Selva Karna
on 6 Feb 2021
Categories
Find more on Medical Physics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!