MATLAB: How to create 3d model of a large matrix

MATLABmodel

I have an IR image loaded gimg with dimensions 720×1280 uint8 i want to extract depth data from this image let say that the value of each element goes from 0 to 200 where 200 equals 4m and 0 equals 0m. i want to create a point cloud data from this is it possible i was trying by using a binary 3d matrix with size 720x1280x200 how ever using isosurface is just crashing matlab

Best Answer

[R, C, S] = find(IR_Image);
pc = pointCloud( [double(C(:)), double(R(:)), double(S(:)) .* (4/200)] );
This code assumes that value 0 should not show up