How to create image from array with millions of rows and 3 columns?
1 次查看(过去 30 天)
显示 更早的评论
I am working on LiDAR data processing on MATLAB. I hav txt file with x,y,z data of 6 million rows and 3 columns. I need to convert it into image for further processing. How to do that? I imported the txt file to an array also. Help me.
0 个评论
回答(1 个)
Chad Greene
2016-3-10
In your txt file, are the x and y values some regularly-spaced repeating pattern? By that I mean, does it look like:
x y
1 1
1 2
1 3
2 1
2 2
2 3
. .
. .
. .
or is your dataset a bunch of scattered points?
If the x,y values are already in some repeating pattern, you can likely reshape your z column to a gridded image.
If your x,y,z data are scattered I recommend John D'Errico's gridfit. Six million points will be no problem for gridfit as long as you don't try to map them to a high-resolution set of nodes. You'll have to tinker with the smoothing parameter a little bit. For my work with lidar data a smoothness value of 0.01 tends to be a good starting place.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!