Trying to further clean up a binary image, and I've attached the image to this question. I've done a color thresholding based on the Color Thresholder app and clicked "Show Binary":
function [BW,maskedRGBImage] = createMask(RGB)
I = RGB;
channel1Min = 0.000;
channel1Max = 255.000;
channel2Min = 0.000;
channel2Max = 13.000;
channel3Min = 0.000;
channel3Max = 255.000;
sliderBW = (I(:,:,1) >= channel1Min ) & (I(:,:,1) <= channel1Max) & ...
(I(:,:,2) >= channel2Min ) & (I(:,:,2) <= channel2Max) & ...
(I(:,:,3) >= channel3Min ) & (I(:,:,3) <= channel3Max);
BW = sliderBW;
maskedRGBImage = RGB;
maskedRGBImage(repmat(~BW,[1 1 3])) = 0;
end
This gets me closer, but is there a way I can refine this so that the area around the round/circle elements are black, but leaving the round/circle elements as they are?