Curvature of a pencil stroke

I'm trying to evaluate the curvature of an image of a pencil stroke based on the image's pixels and their shade of gray. I'm trying to get the curvature of the line at every point of the stroke. The part I'm not sure is the calculation of the curvature itself considering the noise.

Here is how I'd process ;

  1. Image treatment. Higher the contrast and drop the pixels under a threshold of gray. I want to keep a scatterplot of the stroke and discard the white in the image.
  2. Calculate the position of a pixel on the line. I'd use the diffusion space (R. R. Coifman and S. Lafon) to evaluate the distance between pixels, thus their position of the line.
  3. Calculation of the curvature at each pixels. Here is the part I'm not so confident in. Most expression of the curvature of a line I've seen don't consider the noise (here the thickness of the stroke). I'd use an approximation based upon the curvature of a function according to it's derivative. I'd evaluate the derivative based on an average of the points far enough on the diffusion space.
  4. Now I have for each pixel the distance on the diffusion space and their curvature. I could average that, but ideally there shouldn't be too much noise.

So really, I'm not so sure how to go here. I know I can obtain something meaningful in the way I described, but the result will be highly dependant on the scale of the evaluation of the curvature. Having bias in the result is not so bad, because I'm more interested in comparing the curvature at differents points.

Answers


I would think about fitting circle segments. Essentially getting the curvature is the same as finding the best fitting circle and taking 1/radius of that circle.

Fitting a circle to noisy data is similar problem to fitting a straight line through noisy data, you just have one more variable.

Another possibility might be using a Hough transform http://en.wikipedia.org/wiki/Hough_transform which has been used to find circular features.


Need Your Help

Visual Studio 2010, Crystal Report for Visual Studio 2008 and ClickOnce

c# .net visual-studio-2010 crystal-reports clickonce

I'm in a bit of trouble here. I upgraded one of our Winforms products from VS2008 to VS2010 about 4 weeks ago. The conversion was fine but we used Crystal Reports so had to install the VS2010 Crs...

popviewcontroller from view 2 causes view 1 to stop animating its background

iphone ios xcode popviewcontroller

Really weird issue, i've got a view (view 2) that i'm popping to bring up my main view (view 1) which has an animated background. Once i pop from view 2, view 1 loses those animations... the weird ...