imsubtract(data(:,:,1), rgb2gray(data));

2 次查看(过去 30 天)
imsubtract(data(:,:,1), rgb2gray(data));
how does the above function work??i know the operation of imsubtract in general.Here i dont understand the part "data(:,:,1)" where 'data' is an image and what does "(:,:,1)" specify here??plz anyone respond to this and give me answer as soon as possible..thankyou

采纳的回答

Sean de Wolski
Sean de Wolski 2012-1-24
data(:,:,1) specifies the first three dimensional slice of data. In an RGB image, this would be the R slice (plane).
  3 个评论
David Young
David Young 2012-1-24
Have a look at http://www.mathworks.co.uk/help/techdoc/ref/colon.html
David Young
David Young 2012-1-24
... and also www.mathworks.co.uk/help/techdoc/math/f1-85462.html

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by