Skip to content

Commit

Permalink
add README file to calligraphy smooth tool
Browse files Browse the repository at this point in the history
  • Loading branch information
liupeng89 committed Jun 8, 2018
1 parent ad8dd2b commit 68b7952
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions calligraphySmoothingTool/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
The procedure of Calligraphy contours smooth of character:

1. Load original image of RGB;

2. Convert RGB image to grayscale image;

3. Convert grayscale image to binary image;

4. Separate character into several connected components and process each component one by one;

5. Corner detect (using Harries corner detector) to get points of corner regions;

6. Determine the center points of these corner regions;

7. Get contours of component; if there are holes, the number of contours are larger than 1, otherwise it is 1;

8. Process contours to get closed and 1-pixel width contours;

9. Find valid corner points of contours that closed to the center points of corner regions;

10. Separate contours into sub-contours based on the corner points;

11. Cubic Bezier curve fit all sub-contours with max-error threshold;

12. Merge sub-contours together;

13. Merge all smoothed components;

14. Return smoothed image.
Empty file removed test_auto_smooth.py
Empty file.
Empty file removed test_bezier_curve.py
Empty file.
Binary file removed utils/__pycache__/Functions.cpython-36.pyc
Binary file not shown.

0 comments on commit 68b7952

Please sign in to comment.