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).
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?
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.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With