RGB image

5 ビュー (過去 30 日間)
Michael Shapira
Michael Shapira 2011 年 11 月 4 日
I just started to learn image processing. My question is about RGB image. I understood that RGB values should go between 0 to 1 in 3 dimential matrix, but I see all kind of value but not 0...1 Here is my code:
Image=imread('someColorImage.jpg');
s=size(Image);
for i=1:s(1)
for j=1:s(2)
% handle rgb negative
disp(Image(i,j,1));
disp(Image(i,j,2));
disp(Image(i,j,3));
end;
end;
What is wrong?

採用された回答

sco1
sco1 2011 年 11 月 4 日
For 8bit representation, RGB values go from 0 to 255. The 1-3 index is for Red, Green, and Blue, respectively.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by