MATLAB: Curvature direction

circlecurvatureorientation

i want to find curvature direction in a circle image.can anyone help me with matlab code to find the direction of curvature as clockwise or counterclockwise.

Best Answer

Is the circle actually part of an image, or do you have the coordinates of the circle? If you have the coordinates, it's just a matter of calculating the sign of the cross product.
cp = cross( [x(2)-x(1), y(2)-y(1), 0], [x(3)-x(1), y(3)-y(1), 0])
direction = sign(cp); %+1 if counterclockwise, -1 if clockwise