开发者

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(:)]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜