I plot a second-order polynomial using the following code in Matlab:
xx = 1 : 4000;
mu = 1.0e+03 * [ 2.0733; 0.6569];
b = 198;
P = [2.5577, -1.0134, 102.4344];
figure;imshow(img,'border','tight');
hold on;
plot(xx,polyval(P,xx,[],mu)+b,'LineWidth',1.5,'Color','r');
It results the following image:
However, if I comment out the figure;imshow(img,'border','tight');
it shows the following curve:
First, I don't know why these two plots differ and which is the right plot of the polynomial.
Second, I look for a measure for the degree of bending for the object shown in Figure 1, so that I be able to compare two objects with low or high bending (curvature). However, I don't know how to extract such a measure from the polynomial formula. I tried to use the coefficient of x^2
(P(2)), but I am not sure if it is a representative of the curve in Figure 1, because Figure 2 shows something different.