Converting an image into three column format
3 次查看(过去 30 天)
显示 更早的评论
I have an image file of size 1000X1000 array. I need to convert it to a three column format with the first two columns representing coordinates and the third column representing the pixel value or in my case height/intensity values. Any options for doing this?
Bharath
回答(1 个)
Walter Roberson
2013-1-1
[r, c] = find( true(size(YourArray));
col3 = [r(:), c(:), YourArray(:)];
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!