PDollar-Unity icon indicating copy to clipboard operation
PDollar-Unity copied to clipboard

Inconsistent data in mobile

Open VitorMouraProgrammer opened this issue 4 years ago • 1 comments

Hi! I tested both on windows and mobile (landscape), In mobile, using the same gesture targets as windows I get inversed or non-related results, and they are never more consistent to .8f. Maybe it's a resolution problem? I will do a few tests and update this as well.

VitorMouraProgrammer avatar Feb 02 '21 15:02 VitorMouraProgrammer

EDIT: For anyone else having the same issue, the problem might have to do with how different devices handle the decimal point. In GestureIO.cs line 84 and 85 the X and Y values are parsed using float.Parse(). I changed the lines to include 'CultureInfo.InvariantCulture' as a second parameter, because I found that the values were parsed incorrectly on some devices. The lines now look like this: float.Parse(xmlReader["X"], CultureInfo.InvariantCulture), float.Parse(xmlReader["Y"], CultureInfo.InvariantCulture),


Hi there!

I'm experiencing the same issue on 2 out of 6 devices, (1 Android, 1 iPhone), where the algorithm gets a completely different, and incorrect result. I tried debugging the values of all the gestures it tested on, and the distance values seem to favour some specific (and incorrect) gestures, while never getting others. The score value still ranges between 0.7 and 0.9

I have discarded the sample it comes with, and made my own sample of gesture to work with, and it works correctly in Editor, as well as most mobile devices.

I've tried normalizing the points, by dividing by Screen.width, so it does not appear to be an issue with resolution.

It is of course likely that I have made mistake somewhere, but since it's working correctly in editor, and most devices, I wanted to reach out to hear if you had experienced any sort of similar behaviour, and/or possible fixes.

BertilUmami avatar Dec 03 '21 18:12 BertilUmami