Color Detection By HSV color model

Detect specific color in an image and output as a Black/White image

You are now following this Submission

Input: image object in RGB format

Output: binary image objects (1 stands for the target color, 0 otherwise) for Black, White, Red, Yellow, Green, Cyan, Blue and Magenta color detected in the input image object

demo:
Im = imread('a.jpg');
Im_ColorLayer = color_detection_by_hue(Im);
imshow(Im_ColorLayer.black);

Cite As

Marco Chak Yan Yu (2026). Color Detection By HSV color model (https://www.mathworks.com/matlabcentral/fileexchange/42440-color-detection-by-hsv-color-model), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0