2

I have a series of continuous frames which record drawing by pens with real hands. (Those frames)

What I want to do is reconstruction the drawing strokes.

I want to remove the hand area. Hands

I have thought about its property.

1.The drawing are thin lines.

2.The drawing are continuous.

3.The drawing won't change only if obscured by hands.

So, now I have came up with little idea.

Because I have all the frames already.

For the current frame's black pixel, I will check if afterward frames mostly the pixel is black or not(because sometimes obscured by hands), then I recognize it as drawing strokes.

But the effect isn't good.

I have checked some line detection, edge detection, contour detection but not what I want.

Could you give me some advice or direction? 1.How to extract thin line? 2.How to remove hand area?

Jason
  • 1,573
  • 3
  • 18
  • 46

1 Answers1

1

Look into the Stroke Width Transform (Stroke Width Transform (SWT) implementation (Java, C#...)). The concept is relatively simple, and the original algorithm has since spun off several variants.

Since you have multiple frames, you could also simply retain any pixels that are present in every frame (starting with the first frame in which a pixel is turned "on"). This might be simpler to implement than the Stroke Width Transform (or related algorithm), but in the long run may not be as robust as you'd like.

The Stroke Width Transform has the advantage of working in natural, complex scenes.

Community
  • 1
  • 1
Rethunk
  • 3,976
  • 18
  • 32
  • I have seen it used to extract text, but can it also can extract thin drawing stroke? – Jason Feb 16 '16 at 07:15
  • 1
    Sure. The SWT algorithm is straightforward enough that you could also tweak it to adapt to your needs. At the very least you can use the idea that a line passing perpendicular through a point P on the perimeter of a stroke will pass through another perimeter point on the far side, and that the line will be perpendicular to that side as well. Strokes will consist of pairs of matching perimeter points within some distance D of one another. Other shapes will have non-parallel sides and/or the wrong thickness. – Rethunk Feb 16 '16 at 14:02