How to get the surface roughness of the top surface of a 3D matrix.

5 views (last 30 days)
Hello,
I have a 3D matrix A, let B equal
B=(size(A,1)/2,:,:);
imshow(squeezeB());
this imshow gives the image in the attachement
How to get the surface roughness of the top of the matrix A in [a.u] unit ?
  7 Comments
John D'Errico
John D'Errico on 29 May 2020
Edited: John D'Errico on 29 May 2020
There are two questions here.
First, are you really looking to compute a surface roughness measure? Or are you looking to find some smooth approximation to that surface?
The two are completely different things, because the smooth surface you seem to be asking about is by definition not rough. Knowing what is the real goal of a question is important, and we need to know that BEFORE we try to solve the problem. Else we just go wandering down blind pathways, that while technically interesting, blind paths are just a waste of time.
"How to get the surface roughness of the top of the matrix A in [a.u] unit ?"
So does this ask for some effective numeric measure of roughness? If so, then I'd probably want to think fractally. Perhaps do some reading. Some random things I see online:
Logically, I would want to estimate the fractal dimension of that boundary surface, and use that as a measure. The virtue of fractal dimension is it is a non-dimensional measure. So I might do a search for how to estimate the fractal dimension of a surface in MATLAB.
Alternatively, I suppose you could treat the boundary as a random walk of sorts, effectively Brownian motion, in which case the "roughness" becomes defined by the variance (or standard deviation) of the random process. But a standard deviation has units attached to it, and I personally prefer the non-dimensional fractal idea.
Anyway, then in other places you seem to be asking to find that smooth curve itself.
If you want to find that curve, a convex hull is unlikely to make you happy of course, because that surface is the antithesis of convexity. Fractal is a far better description. To find a smooth approximation to the surface, I would:
  1. Find the points on the surface, AS YOU CHOOSE TO DEFINE THE SURFACE.
  2. Use an interpolation scheme, designed to interpolate smoothly from pooint to point on said surface. A spline is usually a good choice here.
And note that I said to find A smooth approximation. I said A, not THE, because there are infinitely many smooth approximations to interpolate a list of points.
So what is your real question, as the two questions I've seen you asking are completely different?
Hassan Zhairabany
Hassan Zhairabany on 29 May 2020
Dear, John D'Errico
First thanks for your clear description.
Actually what I am looking it is not to plot a surface that follows how the elements on the top boundary of the matrix are distributed. or to make it smoother.
I am looking as you said, to compute a surface roughness measure, so finally I want to get a number or a value. and I think the non dimensional fractal idea, will work adequately.
so what I need is : "how to estimate the fractal dimension of a surface in MATLAB".

Sign in to comment.

Answers (0)

Categories

Find more on Fractals in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!