How to calculate intensity of a particular color in an RGB image
    조회 수: 12 (최근 30일)
  
       이전 댓글 표시
    
I have an rgb image with varied intensity of the colour green. How can i determine the intensity? 
댓글 수: 0
채택된 답변
  Image Analyst
      
      
 2020년 12월 21일
        To get a matrix with the gray level intensities of the three different color channels, use imsplit:
[r, g, b] = imsplit(rgbImage);
g will be a matrix of your green intensities.  If you want the overall intensity considering the other color channels, you can use
hsvImage = rgb2hsv(rgbImage);
[h, s, v] = imsplit(hsvImage);
and look at the v channel, or
labImage = rgb2lab(rgbImage);
[L, a, b] = imsplit(labImage);
and look at the L image, or
ycbcrImage = rgb2ycbcr(rgbImage);
[Y, Cb, Cr] = imsplit(ycbcrImage);
and look at the Y image.
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Modify Image Colors에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!