3D graphic plot

Hello guys, if I have a 3D graph what I can do to measure the high of the graphic. Here's the graphic that I mean..

Answers (1)

Arthur Roué
Arthur Roué on 16 Jul 2020
Edited: Arthur Roué on 16 Jul 2020
You can look for the surface handle in the axis children.
% Get current axe handle
hAxe = gca;
% Look for surface handle
vb = isa(hAxe.Children, 'matlab.graphics.chart.primitive.Surface')
hSurface = hAxe.Children(vb)
% Get values in surface properties
hSurface.XData
hSurface.YData
hSurface.ZData
EDIT : I assumed there is only one surface in this plot

18 Comments

Thanks a lot, I get the data in matrix form, can I transform it into a 2D graph like this picture?. I'm a newbie in MATLAB
Arthur Roué
Arthur Roué on 20 Jul 2020
You're welcome ! I answered your original question, can you accept it and post another one for this new one.?
It is not clear how u/pixel relates to the XData, YData, or ZData coordinates. Is height/mm the ZData ? The graphic we are shown only apperas to have one surface, so it is not clear where the second output of the 2D plot would come from.
The second 2D plot just an example i see from another 3D graph measurement. I don,t know how to get mine become like the second 2D plot.
You have three independent variables (x y, z) and one dependent variable (color)
You appear to want an output plot with one independent variable and one dependent variable. How do you want to synthesize the one independent variable from the four variables, and how do you want to synthesize the dependent variable from the four?
Here is the surface graphic i have, how can i measure the high from several distance between the surface? It seem the highet peak is about more than 250
is the input an rgb image or is it a surface plot?
your x and y axes are not labeled so I don't know what is being plotted
agung pratama
agung pratama on 21 Jul 2020
Edited: agung pratama on 21 Jul 2020
The input is an RGB Image. Its an XZ plane, please can you show me how?
If all you have is a single rgb image then you cannot measure height in most cases. See for example https://thevortexrug.com/ which is flat rugs that appear to have significant depth.
So what i have to do if i want to measure the height of something using Image in Matlab?
You need a stereo image pair with calibrated cameras.
Or the image has to have a reference pattern built into it, in which case an exact measurement is likely not possible but a range might be possible.
A reference pattern could, for example, be an equal-spaced grid of vertical lines being projected parallel to the table, so that you could bracket the actual height by counting the number of lines that appear on the object.
Thank you, Mr Roberson. I'm measuring the deflection of a plate using the codded light pattern and moire interferometry method as a reference pattern. I'm also using a camera to take the image when applying a centralized load to the plate.
Do you have any suggestion to measure the surface's height of the plate after applying centralized load?
A sample image would help, along with any necessary key information (such as distance between fringes, and any information about the coding of the light pattern.)
agung pratama
agung pratama on 23 Jul 2020
Edited: agung pratama on 23 Jul 2020
I don't have the image yet, the Laboratorium that experiment takes place close because of Covid-19. I hope next week I will able to do it. But i assume maybe something like this picture
Here I attach the coding I use to create the fringe pattern, it's an analog and binary grating. I'm still not sure what is the better one
Bruno Luong
Bruno Luong on 23 Jul 2020
Edited: Bruno Luong on 23 Jul 2020
If you have a fringe image then the unit of z axis is radian (phase angle) The bottom image is unwrapping of the first, the height is
h = (max(phi(:))-min(phi(:)))*lambda/(4*pi)
phi is unwrapped angle image (bottom), lambda is the wavelength of what ever wave used to measure this interference pattern. Due to the noise, you have to filter the image data, or perhaps use histogram to compute (max(phi)-min(phi)) that least affected by the noise.
Thanks, Mr Luong. Can you give some example so I can understand how to use the equation you give.
Bruno Luong
Bruno Luong on 23 Jul 2020
Sorry I won't, since depends where you start at (type of image data, and you never explain us clearly what is it, your gave a color map, then a bananas, something about RGB, then a curve, then a fringe signal) and there might be many step more or less complex and requires some skill (for example compute the phase phi) to arrive at the heigh from the rawdata image of your fringes.
I gave you a general steps that must be carried out. If it's not clear, you should teach yourself or ask questions to your advisor, or whom ever gave you the task.
Thank you, Mr Luong, for your time and your attention. I'm a newbie in Matlab, perhaps I should learn more and more.

Sign in to comment.

Categories

Find more on Image Processing and Computer Vision in Help Center and File Exchange

Asked:

on 16 Jul 2020

Edited:

on 23 Jul 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!