필터 지우기
필터 지우기

image processing displaying color of the particular plane in the histogram

조회 수: 2 (최근 30일)
Hi,
Is it possible to display histogram of color in a color image from a particular plane? like when we use imhist we get shades of grey bar below the histogram could we do that in color ?

답변 (1개)

Image Analyst
Image Analyst 2020년 7월 14일
No, that's not a feature. In fact there is no RGB histogram function. You can extract each color channel into a monochrome image and then call imhist() and get the gray scale wedge underneath the histogram, but it will be in grayscale because it has no idea where (what color channel) the monochrome image array came from.
  댓글 수: 4
Image Analyst
Image Analyst 2020년 7월 18일
편집: Image Analyst 2020년 7월 18일
So if you have a general cluster of points, like a random cloud, then the centroid of the cluster is the mean of the x, y, and x. So assuming you have a color image,
[redChannel, greenChannel, blueChannel] = imsplit(rgbImage);
midR = mean2(redChannel)
midG = mean2(greenChannel)
midB = mean2(blueChannel)
So those are the values. Note that since they're the mean, and are probably non-integer values, there may be no pixel in your image that has the mean value (even if the mean were integer).
But now we come to where we need to understand exactly what "looking at the mid grey level from the color pixels in the three axis separately" means. Does it mean that you want to zoom in on your plot to the middle, like this:
xlim([midR - 5, midR + 5]);
ylim([midG - 5, midG + 5]);
zlim([midB - 5, midB + 5]);
I really have no idea unless you explain that phrase much more accurately, or put up a picture of what you hope to obtain.

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

카테고리

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