필터 지우기
필터 지우기

How to detect various colors in a image?

조회 수: 2 (최근 30일)
phaneendra ch
phaneendra ch 2015년 12월 11일
답변: Image Analyst 2015년 12월 12일
I want to detect various colours of a image accurtely. If there is a red colour in image with different intensities the code must able to detect the changes and must generate a separate plot for it.
  댓글 수: 1
jgg
jgg 2015년 12월 11일
The standard imread command ( http://www.mathworks.com/help/images/read-image-data-into-the-workspace.html ) will return you a map of your image with the colour channels seperated out. For instance, in a .jpeg, the red colour channel corresponds to im(:,:,1).
I'm not sure what you mean plot in this context. Can you give an example of what you're trying to do?

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

답변 (2개)

Image Analyst
Image Analyst 2015년 12월 12일
See several color segmentation demos in my File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
In addition, see the attached zip file where I find the green parts of a Sharpie marker pen moving in a video.
Let me know if you have any problems, but only after you've read this.

Image Analyst
Image Analyst 2015년 12월 12일
An alternative to my other answer is one that looks at a video and finds the mean intensities of the R, G, and B channels and plots them.

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by