File Exchange

image thumbnail

Color Detection

version (284 KB) by Suraj Kamya
RGB Color Detection in Images Real Time Video


Updated 24 Jul 2012

View License

RGB color detection in images and Real time video is presented in this project.

# Color Detection in Image
1. Click on Use Image
2. Select image source
*Demo Image (Already in files)
*Browse Image (Use your own acc. to supported formats: jpg,bmp,jpeg,png)
*From Camera (after preview click on Take Snapshot)
3. Choose color
4. Start Detection

# Color detection in Real Time Video
1. Click On Real Time Video
2. Select no. of frames and click on set. (Time duration of Live Video)
3. Select color
4. Start Detection
-- In detected Components black screen will appear. Whenever it detect a color component it shows only that color.--

Cite As

Suraj Kamya (2021). Color Detection (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (16)

tashu Dabariya

I have a question can I use this code as a greenness identification in the plant?

aijaz ahmed

Excellent Project with Nice GUI

Ximena Lopez Lazaro

can you helpme pls, i dont how put my image in this funtion!!

lost heart

oh thanks you

Suraj Kamya

Check out my video lecture series on MATLAB on you tube channel."OHA".
Search on YouTube by my email id.

Suraj Kamya

If still having any questions or doubt contact me on mail.

lost heart

Can you tell me how make the guide in matlab ???

Amir Soleimankhani


Peter Valletta

s Liang



Can you send me synopsis & project file of this project at


Thank you so much..nice code


Suraj Kamya

Please give reviews for this project.

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!