Extract border points from surface points (compatible with autogeneration in C)
7 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Image Analyst
2024-11-26
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:
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Bounding Regions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!