Matlab中增强对比度的图像矩阵变量

The Matrices Variable of Image for Enhance Contrast in Matlab

我有这样的代码:

i=imread('c.jpg'); %create variable
i=im2double(i); %convert i's value from uint8 into double
figure; %create new window
imshow(i, 'Border', 'tight'); %display image into window

ir=i(:,:,1); %what is '1' for?
ir=histeq(ir); %enhance it's contrast
figure; %create new window
imshow(ir, 'Border', 'tight'); %display image into window

ig=i(:,:,2); %what is '2' for?
ig=histeq(ig); 
figure;
imshow(ig, 'Border', 'tight');

ib=i(:,:,3); %what is '3' for?
ib=histeq(ib);
figure;
imshow(ib, 'Border', 'tight'); 

Igab = cat(3, ir, ig, ib); % combine 3 pics become 1 pic
figure; 
imshow(Igab,'Border','tight');

我的问题是,i(:,:,1) 中的“1”、“2”或“3”是什么?

我只是知道它是 Matlab 工作区中图像值的矩阵。我知道 i(:,:) 的含义是一个 'i' 矩阵,所有行,所有列。但是如果 i(:,:,1) 呢?

我是新手

如有任何帮助,我们将不胜感激。

1 代表红色

2 代表绿色

3 代表蓝色