Plot a Contour with no zigzag

조회 수: 4 (최근 30일)
NIMA FARHANG
NIMA FARHANG 2019년 3월 29일
답변: Bjorn Gustavsson 2019년 3월 29일
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
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
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

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품


릴리스

R2012b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by