Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In-place (Scale/rot/trans-penalizing) curve matching score

I'm new to computer vision, although experienced in graphics development in general.

I have a simple application, which I wish to present a stroke (an arbitrary, but probably quite simple 2D curved path) on the screen to the user, and ask the user to replicate it, again with a single stroke. I would like to measure the accuracy with which the user replicates the stroke.

My first attempt at replicating this functionality using cv::matchShapes to compare a vector of the source curve points with a vector of the drawn curve correctly scores shape similarity well, but is actually too robust. I want users to copy the stroke in place, not draw it at an arbitrary position/scale on screen.

To be clear,

  1. Drawing the stroke in either direction should be supported (although presumably this can be added even if the underlying algorithm does not support by testing twice.)
  2. The metric should NOT be invariant to translation, rotation, scale, that is the user must draw the shape in place.
  3. The stroke may or may not be closed. We know in advance whether the template is closed. If the tempate is closed (such as an ellipse) then we would _prefer_ the user to be able to start and end their stroke at any point on the ellipse, but this is not an absolute requirement.

I realize this is the opposite of most computer vision, when you're trying to robustly match arbitrary input. In this case, I want to score correctness of input to a very precise target. Can anybody please suggest a better approach?

Thanks for your time.

click to hide/show revision 2
retagged

updated 2014-04-07 14:20:28 -0600

berak gravatar image

In-place (Scale/rot/trans-penalizing) curve matching score

I'm new to computer vision, although experienced in graphics development in general.

I have a simple application, which I wish to present a stroke (an arbitrary, but probably quite simple 2D curved path) on the screen to the user, and ask the user to replicate it, again with a single stroke. I would like to measure the accuracy with which the user replicates the stroke.

My first attempt at replicating this functionality using cv::matchShapes to compare a vector of the source curve points with a vector of the drawn curve correctly scores shape similarity well, but is actually too robust. I want users to copy the stroke in place, not draw it at an arbitrary position/scale on screen.

To be clear,

  1. Drawing the stroke in either direction should be supported (although presumably this can be added even if the underlying algorithm does not support by testing twice.)
  2. The metric should NOT be invariant to translation, rotation, scale, that is the user must draw the shape in place.
  3. The stroke may or may not be closed. We know in advance whether the template is closed. If the tempate is closed (such as an ellipse) then we would _prefer_ the user to be able to start and end their stroke at any point on the ellipse, but this is not an absolute requirement.

I realize this is the opposite of most computer vision, when you're trying to robustly match arbitrary input. In this case, I want to score correctness of input to a very precise target. Can anybody please suggest a better approach?

Thanks for your time.