how convert gray image to n-by-3 array
Hi I use imread for gray image reading. It gives me a x-by-y matrix (contains gray level in every cells) but i need it in n-b开发者_StackOverflowy-3 (x,y, and gray level) array of image points.
How i can convert imread result to n-by-3 array.Thanks
[height, width] = size(image);
[X, Y] = meshgrid(1:width, 1:height);
points = [X(:) Y(:) image(:)]
精彩评论