- https://www.mathworks.com/matlabcentral/answers/131760-how-to-find-contour-inflection-points?s_tid=answers_rc1-2_p2_MLT
- https://www.mathworks.com/matlabcentral/answers/385053-how-to-find-a-number-of-inflection-points-in-a-contour?s_tid=answers_rc1-1_p1_MLT
get the inflection points of a contour
5 views (last 30 days)
Show older comments
Hello,
I want to find the inflexion points of a contour made by adjacents pixels.
An example of contour can be find here : http://sylvain-ard.fr/temp/cnt.csv
It must delete noise (small inflexions).
Please help me
Thank you
The image of the example contour is here :
2 Comments
Kanika Gupta
on 25 Jun 2020
I think you can find a solution here :
Answers (2)
darova
on 28 Jun 2020
Here is a start:
- use boundary function to find (x,y) coordinates of your contour (and order)
- Smooth the curve: reduce points and interpolate the data using this 3d interpolation
- use cross product to find inflection points
simple example
x = 0:0.2:10;
y = sin(x).*x.^2;
dx = diff(x)';
dy = diff(y)';
v0 = dx(2:end)*0;
a1 = [dx(1:end-1) dy(1:end-1) v0];
b1 = [dx(2:end) dy(2:end) v0];
n = cross(a1,b1,2);
ix = find( diff(sign(n(:,3))) );
plot(x(ix),y(ix),'or')
line(x,y)
0 Comments
See Also
Categories
Find more on Smoothing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!