How to find the curvature of the Points on the boundary

Hi, I have obtain the object boundries by using the bwboundaries commond in MATLAB. Now I want to calculate the curvature of the point for example set of b(i-5), b(i), b(i+5). b(i) is the point on the boundary and b(i-5) & b(i+5) are the neighbors of the point. here b(i-5) and b(i+5) are end point of the set. Also i would like to find the distance of the point b(i) from the straight line connecting the two end points b(i-5) & b(i+5) of the set. I don't know how to obtain straight line between b(i-5) & b(i+5). Also i don't know how to calculate the perpendicular distance from the point b(i) with the straight ling joining b(i-5) & b(i+5). Please help me to solve this problem. Thanks in advance

2 Comments

Hello Harshal,
Did you find the MATLAB code for this? I am also looking for the solution of similar problem. I want to first find the boundary coordinates and then finding the curvature for that.
Would be nice if you can help in this regards,

Sign in to comment.

 Accepted Answer

3 Comments

Thank you so much for the suggestions, the link is really excellent for calculating the distance of the line from the point with 3 Dimension. But i Want to find out the distance of the point from the line in 2-Dimensions and unfortunately we can't find the cross product of 2-D points hence the distance formula fails their. Please suggest the formula for calculating the distance of 2_d point from the line if possible. Thanks in Advance
Thank u so much for the link. It will definitely solve my problem. Thanks once again..!

Sign in to comment.

More Answers (2)

See Steve's presentation at ICIP http://blogs.mathworks.com/steve/files/MATLAB-Today-ICIP-2015-16x10-format-distribution-version-medium-quality-compression.pdf, and his discussion of alphaShape() and boundary(). Actually this should be a must read for everyone since it contains lots of good information on a wide variety of new functions.

5 Comments

Thank u for your answer but i am using the older version of MATLAB and alpha shape is available in newer version(2015a). I want t know how to find the alpha shape for the older version
If you don't want to pay money to upgrade, then you'll have to pay with your time. Start writing. I don't have the source code of it to hand over to you.
Thank u for u r comment..Will write my own code
Thank u so much for the answer Sir.

Sign in to comment.

You can use code in the FAQ to fit a circle to the 3 points you get from bwboundaries():
You will get the radius of curvature for each triplet of points.

3 Comments

Thank u so much for the reply, i Don't want to fit circle to 3 points. I want to check the convexity and concavities of the curve, for that purpose i have to find the curvature and distance of the point from the set of end points, i also want to find the radius of the arch. If the distance of the point from the straight line joining the two end point is greater than the specific threshold then the algorithm stop. I have to do this for the each point on the boundary. Please help me to solve this problem.
Hi dear Harshal, I have to solve the same problem. if you already solved it, please share the code with me. thanks in advance and best regards

Sign in to comment.

Categories

Find more on Linear Algebra in Help Center and File Exchange

Asked:

on 2 Dec 2015

Commented:

on 17 Aug 2021

Community Treasure Hunt

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

Start Hunting!