I would like a method to calculate the curvature of a 2D object. Object is a matrix whit n rows (that are corresponded to n consecutive points) and 2 columns (that are corresponded to x and y coordinates).
In 2D images, there are (at least) two types of curvature. One describing the intensity landscape (e.g., cup, cap, saddle, etc.) and the other describing the shape of the isophotes (curves of equal intensity).
The first is described by the principal curvatures, which are the Eigenvectors of the Hessian matrix.
More details are provided in the book of B.M. ter Haar Romeny (Front end vision...).
In this notation, Lx is the first order derivative to x, Lxx is the second order derivative to x, Lxy is the partial derivative to x and to y, etc..
For curvature estimation, I recommend a derivative that is rotation invariant and (at least) twice differentiable. Otherwise, you measure the shape of the pixel grid, which is undesirable. So, a higher-order B-spline or a Gaussian derivative could be appropriate. The small derivative kernels [-1, 0, +1] are not recommended. More information about the Gaussian or B-spline derivatives can be found in [Bouma e.a., Fast and Accurate Gaussian Derivatives based on B-Splines, LNCS, 2007]. A full text PDF version is available in the following link:
The matrix you are describing seems to contain only the coordinates of the object? Is there an additional column containing the profile of the object or it's something like a binary image?
I may be able to help you with this. Together with a collaborator I've done a curvature analysis of x/y-coordinates over time using a custom written MATLAB script. The script fits a circle to every data point and the curvature is calculated as the inverse of the radius of that circle.
Shoot me an email if you'd like to know the details.
I segmented a shape in an gray scale image. Then I extracted boundary of this shape. The matrix shows coordinates of the boundary. If a point (or pixel) existed in the matrix, then amount of this point is one. Otherwise amount of this point is zero.
In 2D images, there are (at least) two types of curvature. One describing the intensity landscape (e.g., cup, cap, saddle, etc.) and the other describing the shape of the isophotes (curves of equal intensity).
The first is described by the principal curvatures, which are the Eigenvectors of the Hessian matrix.
More details are provided in the book of B.M. ter Haar Romeny (Front end vision...).
In this notation, Lx is the first order derivative to x, Lxx is the second order derivative to x, Lxy is the partial derivative to x and to y, etc..
For curvature estimation, I recommend a derivative that is rotation invariant and (at least) twice differentiable. Otherwise, you measure the shape of the pixel grid, which is undesirable. So, a higher-order B-spline or a Gaussian derivative could be appropriate. The small derivative kernels [-1, 0, +1] are not recommended. More information about the Gaussian or B-spline derivatives can be found in [Bouma e.a., Fast and Accurate Gaussian Derivatives based on B-Splines, LNCS, 2007]. A full text PDF version is available in the following link:
I received a lot of emails regarding the Matlab script for curvature calculation. This script was written by one of our collaborators for this paper: https://elifesciences.org/articles/07789
In the paper we stated that all the code was in this github link:
https://github.com/kevinkchiou/Malaria-Motility
Since then, someone has branched it, meaning one of the readers decided to take the code and modify it.
(Be careful of a typo that was indicated and corrected read the comments first, also the examples have to run -cut and paste into into different files(scripts) then run the two examples /scripts and it can work, this way...)
I prefer this one though. This is more elegant and has some notes too.