GithubHelp home page GithubHelp logo

mohenghui / chinese-calligraphy-vectorization Goto Github PK

View Code? Open in Web Editor NEW

This project forked from herrkaefer/chinese-calligraphy-vectorization

0.0 0.0 0.0 8.1 MB

Vectorization of Chinese calligraphy characters and customized copybook.

Python 100.00%

chinese-calligraphy-vectorization's Introduction

Chinese Caligraphy Vectorization (CCV) Project

Goal

  • Transfer famous Chinese caligraphy works to vector graphics, and establish a library
  • Develop interesting applications based on the library

Method of vectorization

The method I employ is generally as follows:

  • find a high-resolution bitmap of the caligraphy work
  • crop the bitmap into small bitmaps each contains a character
  • vectorize each character bitmap by the aid of vector graph editor (I use Inkscape)
  • export to svg file

It should be noted that the vectorization process has no rigid or unique rule to follow. It is a physical yet artistic job, and no "best" result exists. The ambiguous edges should be decide objectively.

Specific (important) setups for Inkscape: (in Edit -> Perreferences -> SVG output)

  • set "Path string format" to "Absolute"
  • check "Force repeat commands"

What is done

From 2008 to 2009, I vectorized many characters in "兰亭集序" (not finished). This work will be continued in 2016.

Applications

  • Calligraphy copybook. I write a app to re-typeset the characters to produce a copybook of the caligraphy.

demos:

import ccv
ccv.produce_copybook(character_dir   = os.path.join(os.getcwd(), 'calligraphy', 'lantingxu', 'svg'),
                     title           = 'lantingxu',
                     rows            = 8,
                     direction       = 'v',
                     character_ratio = 0.75,
                     grid            = 'on',
                     canvas_width    = 1300)

will produce:

import ccv
ccv.produce_copybook(character_dir   = os.path.join(os.getcwd(), 'calligraphy', 'lantingxu', 'svg'),
                     title           = 'lantingxu',
                     rows            = 8,
                     direction       = 'v',
                     character_ratio = 0.75,
                     grid            = 'off',
                     canvas_width    = 1300)

will produce:

chinese-calligraphy-vectorization's People

Contributors

herrkaefer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.