Your problem is the fact that you're using the indexing from, I guess, Python (as in between 0 and N-1) while Matlab uses indexes starting from 1.
So if you want to plot the first plane, it will be plot(img_blue(150, 1));
instead of plot(img_blue(150, 0));
. Similarly, blue is the third main color, so it will actually be img_blue = img(:, :, 3);
instead of img_blue = img(:, :, 2);
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…