-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pull request to integrate the geometricRecognizer class. #15
Conversation
…s still green. Signed-off-by: Antoine Lavail <antoine.lavail@icloud.com>
….cs file. NOT TESTED YET ! Signed-off-by: Antoine Lavail <antoine.lavail@icloud.com>
… package. Prepare the 'sixthsense' package with the entry point and the empty class SixthSense.java (for now). Signed-off-by: Antoine Lavail <antoine.lavail@icloud.com>
Mega-Commit (sorry about that..) : GeometricRecognizer corrected and tested correctly, 80% tested (sonar numbers). Added the resources folders, with gestures and a test folder. Uncomment some instructions in others classes like in Category, who was waiting for the geometricRecognizer class implementation. Don't forget to consider the resources folder these sub-folders as packages, if you want the getResourceAsStream working properly.
NB : Don't forget to add the jdom2 library in your path ! The lib is in test/lib directory.
Hi, I might need a bit of time to read through some of the changes :) |
No problem, we're not in a hurry :). Ask me if you find some obscure things. |
A couple questions. Line 274 of GeometricRecognizer.java, the comments are in French - could you translate them to English? Secondly, for resampling the Points, could you describe what exactly the resample is performing? I see the same code is reflected in DollarRecognizer, but, I'm not sure if I understand the geometrical basis of the transform. I'm still looking through the code. |
Sorry about the french comment, I had totally forgotten this one :). If I understand well the resample function in PointR, it's more or less like a polynomial interpolation (see: http://en.wikipedia.org/wiki/Interpolation) or a linear interpolation I think. Actually, the principle is pretty much the same than a resample process for an image in photoshop. Basically, we have some points : if we don't have enough points, we insert some intermediates points. Otherwise, we erase some points, probably to avoid loosing some time during the execution. Why the NUMRESAMPLEPOINTS constant is set to 64 ? I have actually no ideas... So in the recognize function, first thing we do is to resample points. Next it's just some angles dispositions. At line 78, the scaleTo function find a box with the given points, and make them fit with the RESAMPLESCALE constant. We basically have a square after that. To finish we apply the golden section search algorithm (http://en.wikipedia.org/wiki/Golden_section_search), and sort descending the results. Note that the 'recognize' function is used in testBatch. I hope my explanations could help you., an english native would have given you more detailed explanations.. |
Thanks a lot for the explanation. Your English is perfectly clear and understandable. |
I have read through most of the commit and it seems good. However, I think it does need some more unit tests and more test coverage. But, I'm going to merge it and change the Travis CI build to Java 7 because most of the code is good. We can move ahead from there. Again, great work and thank you for taking an interest. |
Pull request to integrate the geometricRecognizer class.
Hi,
I've implemented the GeometricRecognizer class, and I've tested it. I think this is OK and over for this one, except some weird instructions, you can find some TODOs in the Geometric class.
I've made some adjustments in the others classes, just to fit with the java rules compliance, no big changes.
I think this is ready for the UI !
Hope this is fine.
Cheers