Image1 = im2double(imread('image\8.jpg'));g=rgb2gray(Image1);[row column page] = size(Image1)mask = Image1(:,:,2) > Image1(:,:,1) & Image1(:,:,2) > Image1(:,:,3);Image2 = Image1 .* mask(:,:,[1 1 1]);figure,imshow(Image2);title('light green');mask = Image2(:,:,2) + 20 > Image2(:,:,1) & Image2(:,:,2) + 20 > Image2(:,:,3);Image3 = Image2 .* mask(:,:,[1 1 1]);figure,imshow(Image3);title('dark green');
MATLAB: I have this code that detects vegetation from a picture. i want to remove it. how should i do that
color segmentationImage Processing Toolboxleaf
Best Answer