Problem using minboundquad function to create a minimum bounding quadrilateral for a given pointset
3 ビュー (過去 30 日間)
古いコメントを表示
Gowtham HariHara
2021 年 5 月 18 日
回答済み: Gowtham HariHara
2021 年 5 月 26 日
I had modified one line in the minboundquad.m function to remove the collinear edges in the pointset.
from
edges = convhull(x,y);
to
edges = convhull(x,y,'Simplify',true);
The main code is
load points2.txt
x = points2(:,1);
y = points2(:,2);
[qx,qy] = minboundquad(x,y)
Result I got is below.
![This is the output](https://www.mathworks.com/matlabcentral/answers/uploaded_files/621303/This%20is%20the%20output%20.jpeg)
There is some error I could not find out. Can someone help me solve this?
0 件のコメント
採用された回答
その他の回答 (1 件)
Shiva Kalyan Diwakaruni
2021 年 5 月 26 日
Hi,
I did not seem to find any error while reproducing and I got the below result after changing minboundquad.m
from
edges = convhull(x,y);
to
edges = convhull(x,y,'Simplify',true);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/630535/image.png)
I got the Warning: Matrix is close to singular or badly scaled. Results may be inaccurate.
Can You explain what your error was?
2 件のコメント
参考
カテゴリ
Help Center および File Exchange で Sequence and Numeric Feature Data Workflows についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!