This script shows you how to find objects of a certain color in an image. Like if you want to find only red or green or blue colors in an image by masking, this code simply works fine.
Tested with MATLAB R2014a.
Pramod Devireddy (2020). RGB Masking of Image (https://www.mathworks.com/matlabcentral/fileexchange/50304-rgb-masking-of-image), MATLAB Central File Exchange. Retrieved .