Extract border points from surface points (compatible with autogeneration in C)
42 views (last 30 days)
Show older comments
Alessio
on 26 Nov 2024 at 10:30
Commented: Alessio
on 27 Nov 2024 at 11:20
Hello everyone! I am working in MatLab r2017a and I am doing some geometrical computations. I got all the points of a surface with which I am working in x and y coordinates. I am trying to extract only the points of the border of this surface, but I can't use MatLab functions that are not compatible with autogeneration in C and I also have to use only fixed-size variables. I already tried to extract them using a local search for extremes in x and y but it doesn't work properly. Can you help me finding a way to implement this?
This is an example of the kind of surface points I get. There are some regions with denser points because this is the result of the projection of a 3D surface in a 2D plane that should represents my FOV.
I hope someone will help me find a solution! Thanks a lot in advance!
0 Comments
Accepted Answer
Image Analyst
on 26 Nov 2024 at 18:03
Try alphaShape
help alphaShape
th = (pi/12:pi/12:2*pi)';
x1 = [reshape(cos(th)*(1:5), numel(cos(th)*(1:5)),1); 0];
y1 = [reshape(sin(th)*(1:5), numel(sin(th)*(1:5)),1); 0];
x = [x1; x1+15];
y = [y1; y1];
plot(x,y,'.')
axis equal
shp = alphaShape(x,y);
plot(shp)
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!