saber-notes / saber

The cross-platform open-source app built for handwriting
https://saber.adil.hanney.org
GNU General Public License v3.0
1.94k stars 118 forks source link

Writing in small cursive ends up in having the word replaced by a straight line #1186

Open c-beuschel opened 3 months ago

c-beuschel commented 3 months ago

Before submitting an issue, please check the following

Describe the bug

I did a long writing session on my Google Pixel Tablet with GrapheneOS on Saber v0.21.2 F-Droid (21020) with an USI 2.0 Pen (Line thickness "2", Line height 60).

I write mostly in traditional and sloppy German cursive and often without lifting the pen for a whole word.

Everytime I wrote a word that was about 5mm in height and 15mm or more in length with a right ponting starting and end stroke, my word was converted to a straight line.

2024-03-21-15-47-16-406

To reproduce

2024-03-21-15-47-16-406

The picure shows two examples of writing. Both done on paper and on the tablet. The first one is fine, because it starts with a downward stroke an ends with a stroke to the right. The second one starts and ends with the pen moving in the same direction and gets converted to a staight line.

Expected behavior

Assistans with straight lines is nice and all, but there is much change in direction in the given example. That schould prevent the algorithm from "helping with straight lines".

Saber version

v0.21.2 F-Droid (21020)

Device

Anything else?

Thank you very much for developing Saber as an Free Open Source Applikation.

QubaB commented 3 months ago

You should turn off Auto staighten lines in settings image

I do not use it too.

c-beuschel commented 3 months ago

That might help with my writing, thank you.

It does not resolve the issue. There schouldnt be a straight line, when drawn line changes the angle of its vector by more than 90° relative to the start and end of the line at any point.

QubaB commented 3 months ago

There shouldnt be a straight line, when drawn line changes the angle of its vector by more than 90° relative to the start and end of the line at any point.

Yes, it is probably better way to compare angles of segments of line. But if the segment will be very short (caused by uncertainty of position), it can be problematic to distinguish if it is straight line or handwriting.

QubaB commented 3 months ago

I changed algorithm of detection in #1187 according to suggestion of @c-beuschel