Hello everybody,
Could anyone help me understand how to use the Character class in the wagomu API? If I understand correctly, I set up kanji recognition like this
Recognizer r;
r.open("/home/fedmest/Documents/wagomu/handwriting-ja.model");
Then I create a Character class (c) and set it up with the points of its vector
Character c(25, 8);
c.set_value(1, 20.0);
c.set_value(2, 21.0);
c.set_value(3, 22.0);
c.set_value(4, 23.0);
And finally process it with the recognizer and use the Results object that is returned
Results *res = r.recognize(&c, 10);
for (unsigned int i = 0, len = res->get_size(); i < len; ++i) {
std::cout << i << ": " << res->get_unicode(i) << ", " << res->get_distance(i);
}
If that is correct, what I am unsure about is what values should be set into the Character instance. I assume it's the coordinates of the points plotted by the handwriting applications, but could anyone give me more details as to how the points should be input - is it a series of x followed by y coordinates, followed by the next point and so on? Is there any order that should be followed? How do we separated stroke points from one another, or is it not necessary to indicate what points belong to what stroke? Also, what is the size of the vector (the one that can be max 4, but usually 2)? What does that indicate?
I'm grateful in advance for any help you can give...
Fed