I have some 3D reconstructed data which I need to visualize in MATLAB. It's quite a lot of data approx 1000x1000x1000, so naturally I most do some efficient visualization.
Any ideas how to visualize it, both in terms of 2D and 3D?
Thanks
You can also use 3D scatter plot in MATLAB:
scatter3(outX,outY,outZ,[size of point], [color value for each point] )
https://www.mathworks.com/help/matlab/ref/scatter3.html
Related
I wonder if anyone can help me to plot two 2D histograms on the same plot.
I do some lifetime imaging and I want to reproduce my result as histograms (phasor plot method). I know how to plot a single 2D histogram, but not more, without removing the preceding one.
I am currently using the DIPimage toolbox, but I have seen that for plotting 2D histograms you can use as well the function 'ndhist'.
Please, find attached the picture. This is not obviously what I am after, as the background should be all blue and I would like to plot more 'clouds' over the universal circle.
Can anyone tell me how to generate a 3D surface model like CAD in Matlab ?
1.Input: Input is a collection of points with (x,y,z) where surface is present for an object(I'm using this for a 3D scanner where my inputs are (x,y,z) of surface)
2.Points should be displayed as a surface using some smooth interpolation.
3.More like surface generation from data points.
Thanks you.
In order to plot surfaces, you can use patch function. However, you need along with the points the faces information. In patch a surface consists of polygons that is specified using 3 point, which is the face information.
1
Since it seems like you will be inputting discrete points located on the surface of the object, you will first want to create a Nonconvex Polygon based on the data using Matlab's boundary function.
https://www.mathworks.com/help/matlab/ref/boundary.html
You can then use the trimesh function to create the figure
This question shows the input data and what was produced using this method: How do I create a 3D polygon/mesh over data points?
I made plots of depth slices using function slice, with each slice showing earth's velocity distribution. I am having a hard time overlaying the location map (coastline) on the figure. Does anyone know if this is possible with MatLab? OR Can you overlay any x,y(and z) plot on slice image?
Thanks all! I figured it out. Had to import coastline data from some online database and used hold on/off to overlay, with plot3. My original plan of using the mapping tools on MatLab didn't work.
I am working on 3d Reconstruction from two views. Till now I have got Fundamental matrix, Essential matrix and Triangulation Points. After this stage, how do I go forward to obtain textured image from the input image? and save those results in VRML model?
Are your cameras calibrated? If so, then you can rectify the images, and get a dense reconstruction. You can then plot the points using the colors from the RGB image. See this example.
I have a 3D Matrix M(256x256x136) and each index(i,j,k) in M has a gray level value in it. I am interested in displaying M in some sort of a 3D plot in MATLAB, but am unable to do so. I cannot use plot3 because plot3 is for plotting points, not the values.
Thanks
If I understand your question correctly, you want to plot the 3D point cloud with i,j, and k as 3D coordinates and the gray level as the point value.
I would suggest using scatter3.
Sounds like you are looking for a volume renderer. For Matlab, you could try this one: Volume Render from Matlab Central
An isosurface plot might be useful as well.