pytorch-handwriting-synthesis-toolkit icon indicating copy to clipboard operation
pytorch-handwriting-synthesis-toolkit copied to clipboard

Handwriting slants up

Open mattlevine32 opened this issue 2 years ago • 1 comments

Thanks for making this project - it's super useful and well documented.

I've noticed that the generated handwriting tends to slant as opposed to being written flat on a line like how https://www.calligrapher.ai/ does it.

Do you have any ideas on how to solve for this?

mattlevine32 avatar Apr 12 '23 01:04 mattlevine32

I see what you mean. One approach is to find a principal direction of a slant and measure its slope. Then, one could construct a simple rotation matrix and use it to transform the coordinates of all points. This method should address most simple cases where the handwriting has a consistent slant.

The problem is that the slant can vary within the same sentence. For example, this algorithm will fail If the text goes up and down.

X-rayLaser avatar Apr 17 '23 08:04 X-rayLaser