MATLAB: I need to find the black spot present in the component image and produce output based on the presence of black spot in the component .. please help me with what methods should i use and code to do it

image processingImage Processing Toolboxorange

Best Answer

Just threshold the red channel and call bwlabel(). See attached code.