Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to extract a stroke from a Chinese character

I've been trying many times to create an algorithm to extract stroke information from Chinese characters. I've tried various methods but none was very satisfying, probably because of my limited knowledge of graphics algorithms in general.

Basically, I have the following data:

  • The Chinese character, which can be either pixels or vector (in black)

  • The overall outline of the stroke, in pixels (in red)

  • An overall direction (the blue arrows).

enter image description here

From this, I'm trying to extract the stroke. If you had to do this, given the available data, what methods would you use? Can you think of any automatic way to extract the stroke?

like image 447
laurent Avatar asked Aug 09 '11 07:08

laurent


People also ask

What is the stroke of Chinese calligraphy?

CJK strokes (simplified Chinese: 笔画; traditional Chinese: 筆畫; pinyin: Bǐhuà) are the calligraphic strokes needed to write the Chinese characters in regular script used in East Asian calligraphy.


1 Answers

I'd start with calculating the distance to the nearest white pixel from each blue pixel. Then you can keep all the red pixels which are closer than the nearest white pixel. The effect may be smoothed with some filter afterwards (maybe something like an erosion followed by a close).

like image 58
Paweł Obrok Avatar answered Nov 16 '22 03:11

Paweł Obrok