Compare two or three surfaces

6 views (last 30 days)
Detox
Detox on 21 Nov 2016
Commented: Image Analyst on 21 Nov 2016
Good morning guys,
my question is about subtracting surfaces from each other. Lets say I have a surface that is like a master surface and I want to see the differences in the Rz values in 3D. My idea was to subtract one surface from another to see what the differences are.
Is this possible with delaunay or surf plot? I am open for new ideas from you guys.
Cheers!

Answers (2)

KSSV
KSSV on 21 Nov 2016
Yes you can subtract two surfaces whether they are unstructured or structured grid. Also check isequal function in matlab.
  2 Comments
Detox
Detox on 21 Nov 2016
Could you elaborate please?
You mean usin the isequal function to see if areas or points of the surface are the same and - if not - plotting them in 3D?
KSSV
KSSV on 21 Nov 2016
If you want to check whether surfaces are equal then isequal. If only difference then subtract.

Sign in to comment.


Image Analyst
Image Analyst on 21 Nov 2016
Unless your two images are of the very same surface AND your two surfaces are perfectly aligned (registered), this will be a noisier method. Why? Review your numerical analysis theory and you'll see the noise on the difference of two noisy signals is the sqrt(2) times the noise on just one surface or the difference of one noisy signal and a constant (or theoretically smooth noiseless surface).
Because of that you're better off computing Ra or Sa on each independently and compare those values rather than try to get some metric on the differences of the two surfaces.
However if you're not analyzing them and simply want to visualize a rough idea of the differences, then you can subtract them and view them with surf() or imshow():
diffImage = double(testImage) - double(refImage);
subplot(1,2,1);
imshow(diffImage, []);
subplot(1,2,2);
surf(diffImage);
  2 Comments
Detox
Detox on 21 Nov 2016
First of all thanks for your answer. I have no images but surfaces created with delaunay command. Do not think that your idea will work, will it?
Image Analyst
Image Analyst on 21 Nov 2016
My code depends on your data being a 2-D matrix. Is there anyway to convert your delaunay object into a matrix like an image?

Sign in to comment.

Categories

Find more on Delaunay Triangulation 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!