modify this code to detect yellow colour

조회 수: 14 (최근 30일)
Faizal
Faizal 2011년 4월 1일
답변: Image Analyst 2017년 3월 17일
where should I modify to get the result of yellow colour
http://www.codeproject.com/Questions/83784/Matlab-colour-detection.aspx
please anyone show to me

답변 (3개)

Jan
Jan 2011년 4월 1일
What is "yellow"? A color with high red and green components:
yellow_redThreshold = 200;
yellow_greenThreshold = 200;
yellowMask = (redBand > yellow_redThreshold) & ...
(greenBand > yellow_greenThreshold);
Perhaps you want a low blue component also?
...
yellow_blueTreshold = 100;
yellowMask = (blueBand < yellow_blueTreshold) & ...
(redBand > yellow_redThreshold) & ...
(greenBand > yellow_greenThreshold);
I'd prefer the HSV color space to determine a color.
  댓글 수: 2
paf  CEO
paf CEO 2011년 4월 6일
HI
I am new to Image processing, i want to make a programe in matlab where i can detect colour " red " , "green" & "blue "
i will save image in workspace /current directory , and then by using if else statment i will detect whats the colour of image ,if image is green it should display "green", if it is red then it should display "red" similarly for blue
if any one knows this , reply me back with coding
Jan
Jan 2011년 4월 6일
@paf CEO: Your message is actually not a commant to my answer. Please open a new thread for a new question.

댓글을 달려면 로그인하십시오.


manasi bharambe
manasi bharambe 2016년 3월 26일
In the similar manner, how can I modify the above given code to detect orange colour in the image. please help
  댓글 수: 2
Walter Roberson
Walter Roberson 2016년 3월 27일
What is "orange" ?
Abdou dgm
Abdou dgm 2017년 3월 17일
please can you change the code to get the yellow color or tell us how to use hsv methode to get the yellow.

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2017년 3월 17일

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by