Is there a way to fit a curve a along the boundary of a surface distribution data plot.

4 views (last 30 days)
I have surface pressure data of a plate. I need to plot a curve along the perimeter of the data so that I can capture its outline. I have tried polyline but the data is highly randomised and the line is highly fluctuating. I have included a picture of the surface data that I have.
Thanks to anyone who can help, I need to do complete this as part of a project and I have been stuck for a week now. cheers !

Answers (1)

John D'Errico
John D'Errico on 8 Aug 2015
Yeah, I know, there must be an EASY way to do things like this. In fact, there are things you COULD probably do. It would take a fair amount of effort to get something that worked consistently well, and did so automatically. You need an answer, and you need it as soon as possible.
The point is, the human eye/brain is amazingly good at these things. It is good at deciding which points may be outliers that you might choose to ignore. It is good at deciding which bumps to follow, at how small of an indentation to go into.
I would write a simple function that uses ginput to take successive mouse clicks from YOU. After each mouse click, have the function draw another segment of a polygonal line along the edge as you see it. When you click the mouse outside of the boundaries of the plot, terminate the operation, and return the line.
If you had more time, and the inclination to learn something about the tools, I might suggest tools like an alpha shape as a place to start. There is now an alpha shape tool in MATLAB.

Community Treasure Hunt

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

Start Hunting!