wagomu ~master
Chinese and Japanese Handwriting recognition. Port of tegaki wagomu engine
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
wagomu
slightly modified wagomu engine from tegaki project ported to D.
Grab a wagomu model from https://tegaki.github.io/ and load and use it using:
import wagomu;
Recognizer r = Recognizer(2); // 2 = how many strokes the drawn characters can be off the actual character
r.load("/usr/share/tegaki/models/wagomu/joyo-kanji.model"); // put your model path in here
// this model uses a canvas of 1000x1000, check the xml file with your model for info
Character ch = Character(20, 1); // point count, stroke count
for (int x = 0; x < 10; x++)
ch.points[x] = [x * 80 + 100, 500, 0, 0]; // generate straight line from x 100 to 900, y = 500
// you can use user input here
// argument 3 and 4 are unused in this model, they might be associated with input like pressure or thickness, depending on the model
// points must be in stroke order, density should be roughly 50 pixels apart each point for this model (10 points per straight line)
// higher density still works but the higher the density is, the more likely it is going to compare with characters with lots of strokes
auto res = r.recognize(ch, 5); // returns up to 5 suggestions for this character, best suggestion first
assert(res[0].unicode == '一');
- Registered by WebFreak
- ~master released 7 years ago
- WebFreak001/wagomu
- GPL-2.0
- Copyright © 2017, webfreak
- Authors:
- Dependencies:
- none
- Versions:
-
1.0.0 2017-Nov-09 ~master 2017-Nov-09 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
18 downloads total
-
- Score:
- 1.0
- Short URL:
- wagomu.dub.pm