how to divide the RGB color space into 64 cubic blocks ?

조회 수: 2 (최근 30일)
SAM
SAM 2013년 12월 27일
댓글: SAM 2013년 12월 29일
Hello
can any one tell me how to to divide the RGB color space into 64 cubic blocks with four equal partitions along each dimension.
  댓글 수: 2
John D'Errico
John D'Errico 2013년 12월 27일
편집: John D'Errico 2013년 12월 27일
How? You do it. Whats the problem? All that matters is what you will do with it, and only you know that.
SAM
SAM 2013년 12월 28일
편집: SAM 2013년 12월 28일
i want to compute color distribution, distinguishing multi-colored images from monochromatic, sepia or simply low contrast images.
and i want to use each cube as a sample point for my further process.

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

채택된 답변

Image Analyst
Image Analyst 2013년 12월 27일
편집: Image Analyst 2013년 12월 27일
Like John said, it depends on what you will do with it - how you will use it. If you want to make a histogram, you need to find out what block you're in
for col = 1 : cols
for row = 1 : rows
% Get the RGB values of the image.
rValue = rgbImage(row, col, 1);
gValue = rgbImage(row, col, 2);
bValue = rgbImage(row, col, 3);
% Find out which of the 64 blocks they belong to.
% Block numbers range from 1 to 4.
rBlock = ceil(rValue / 64);
gBlock = ceil(gValue / 64);
bBlock = ceil(bValue / 64);
% Increment the histogram.
rgbHist(rBlock, gBlock, bBlock) = rgbHist(rBlock, gBlock, bBlock) + 1;
end
end
Also see attached file.
  댓글 수: 5
Image Analyst
Image Analyst 2013년 12월 28일
I don't know what that means exactly, but good luck to you.
SAM
SAM 2013년 12월 29일
Thanks For your Help And Support. i really appreciate your helping Nature Towards the Biginners ...........

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

추가 답변 (0개)

카테고리

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