Plot a Contour with no zigzag
4 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I have a contour like the below image (The far below one is zoomed on its boundary)

How can I turn it into this one:(There are two different patterns, the point is the different edges smoothness)

Besides , I would be really appreciated if you can help me to make my contour tangent to atleast to on axis?
Btw the code for the countour is :
contour (bim,1,'red'); % bim is the the binary image
axis square;
Being said I have the radii for each degree of my pattern, yet they are not integers and have decimals. (ie: 336.4346 is the minimum for the attaxched image)
1 件のコメント
Star Strider
2019 年 3 月 29 日
At any significantly increased resolution, it will always have ‘zigzags’.
You can interpolate it to a finer resolution (and larger matrices), with interp2, griddata, or one of the other interpolation functions.
回答 (1 件)
Bjorn Gustavsson
2019 年 3 月 29 日
If you have access to the spap2 you could try that function, I'd take a stab at converting your contour-data from Cartesian [X,Y] to polar [theta,R] and create a least-square fitting spline of R as a function of theta.
HTH
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!