main.m570 chars21 lines
Explanation:
imread
function.rgb2lab
function. This is because the L and B channels in the LAB color space are useful for color segmentation.blueThreshold
in LAB color space for blue color.imBluePixels
of the blue pixels by comparing each pixel color to the blue threshold using bsxfun
function.gistlibby LogSnag