A run-length-coding-based approach to stroke extraction of Chinese characters