Invariance of curvature in Curvature Scale Space
OK, so let's look at the curvature of some standard objects.

First, a circle:
$$
x(s) = \cos(s)\ ;\ \dot{x}(s) = -\sin(s)\ ;\ \ddot{x}(s) = -\cos(s)\\
y(s) = \sin(s)\ ;\ \dot{y}(s) = \cos(s)\ ;\ \ddot{y}(s) = -\sin(s)\\
$$
so the curvature is:
$$
\kappa(s) = \frac{\sin(s)\sin(s) + \cos(s)\cos(s)}{(\sin^2(s) + \cos^2(s))^{3/2}} = 1
$$

Rotating the circle gives:
$$
x'(s) = \cos(\theta) x(s) - \sin(\theta) y(s)\\
y'(s) = \sin(\theta) x(s) + \cos(\theta) y(s)\\
$$
so that
$$
\dot{x}'(s) = -\cos(\theta)\sin(s) -\sin(\theta)\cos(s) = -\sin(\theta + s)\\ \ddot{x}'(s) = -\cos(\theta)\cos(s) +\sin(\theta)\sin(s) = -\cos(\theta + s)\\
\dot{y}'(s) = \sin(\theta)\sin(s) +\cos(\theta)\cos(s) = \cos(\theta - s)\\ 
\ddot{y}'(s) = \sin(\theta)\cos(s) - \cos(\theta)\sin(s) = \sin(\theta - s)\\
$$
Even thought it looks like I got a sign wrong somewhere, this will also evaluate to 1.

So, at least for a circle, the formula is rotationally invariant.

The trouble comes when you try to implement this.

function [kappa,xdot,ydot,xdotdot,ydotdot] = curvature(x,y,delta_s)
    xdot = diff([x x([1 2])])/delta_s;
    xdotdot = diff([xdot])/delta_s;
    ydot = diff([y y([1 2])])/delta_s;
    ydotdot = diff([ydot])/delta_s;

    xdot = xdot(1:length(xdot)-1);
    ydot = ydot(1:length(ydot)-1);

    kappa = (xdot.*ydotdot - xdotdot.*ydot)./sqrt(xdot.^2 + ydot.^2 + 10^9).^3;

endfunction


The only way to get the "derivatives" of your parameterized curves will be to take differences.  For the circle, this isn't too bad, but for more complex shapes, rotations might make these values a little different --- especially if the shapes are generated from two different sets of measurements.

For example the plot below shows:


The original curvature (note problem at end of range)
The curvature of a circle rotated
The curvature of a noisy circle
The curvature of a rotated noisy circle




// 25885
delta_s = .01;
s = -%pi:delta_s:(%pi-delta_s);
N = length(s);

x = cos(s);
y = sin(s);

xn = cos(s) + 0.001*rand(1,N,'norm');
yn = sin(s) + 0.001*rand(1,N,'norm');

[k,xd,xdd,yd,ydd] = curvature(x,y,delta_s);
[kn,xdn,xddn,ydn,yddn] = curvature(xn,yn,delta_s);

theta = %pi/4;
rot = [cos(theta), -sin(theta); sin(theta) cos(theta)];

all = rot*[x;y];
xdash = all(1,:);
ydash = all(2,:);

alln = rot*[xn;yn];
xdashn = alln(1,:);
ydashn = alln(2,:);

[k2,xd2,xdd2,yd2,ydd2] = curvature(xdash,ydash,delta_s);
[k2n,xd2n,xdd2n,yd2n,ydd2n] = curvature(xdashn,ydashn,delta_s);

clf
subplot(221)
plot(s,k)
title('Curvature of a noiseless circle')
subplot(222)
plot(s,k2)
title('Curvature of a ROTATED noiseless circle')
subplot(223)
plot(s,kn)
title('Curvature of a NOISY circle')
subplot(224)
plot(s,k2n)
title('Curvature of a ROTATED NOISY circle')