Extract border points from surface points (compatible with autogeneration in C)
42 ビュー (過去 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 日 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:
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!