matlab的(r,c,p)是什么意思,如何将黑色像素点改黄色?

函数是把白色的元素改成黄色,要变成把黑色像素点改黄色

for r= 1:nr
for c= 1:nc
if ( im(r ,c,1)>180 && im(r ,c,2)>180 && im(r, c,3)>180 )
% white feather of the duck; now change it to yellow //我知道这里就是把白色的改黄色,那怎么选取黑色的部分呢?
newIm(r,c,1)= 225;
newIm(r,c,2)= 225;
newIm(r,c,3)= 0;
else % the rest of the picture; no change
for p= 1:np
newIm(r,c,p)= im(r,c,p);
end
end
end
end

>180那行是选取白色像素点的意思吧?我试过改成<=180,那就除了白色的部分其他全变成黄色,黑色的rgb值是(0,0,0)那我改成==0也不对,所以rcp是啥意思啊?要怎么修改数值达到选取黑色像素点呢?
感谢!!