-
Notifications
You must be signed in to change notification settings - Fork 6
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
Refactor blob detection outside of the Touch class #20
Conversation
- replace some hard-coded variables by a maxNumBlobs variable - Directly return a movement vector from the blob detector, so client code doesn't have to store previous blob positions - everything needs to be thoroughly tested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may leave this as is for now, but my suggestion is to have the blobdetector as a separate class and the touch class only dealing with extracting the features.
In that case, there's no need for multi versions of the gestures as the class itself will deal with 1 DoF at a time. The user can implement multi versions (or we can create wrappers for that) from the main touch class.
include/puara/descriptors/touch.h
Outdated
|
||
// brush: direction and intensity of capsense brush motion | ||
// rub: intensity of rub motion | ||
// in ~cm/s (distance between stripes = ~1.5cm) | ||
for(int i = 0; i < (sizeof(blobPos) / sizeof(blobPos[0])); ++i) | ||
for(int i = 0; i < maxNumBlobs; ++i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove the iteration and simplify the class to process a single DoF
multiBrush[i] = multiBrushIntegrator[i].integrate(movement[i] * 0.15); | ||
multiRub[i] = multiRubIntegrator[i].integrate(std::abs(movement[i] * 0.15)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we can promote brush and rub as specific classes (separate from the less interesting gestures from this class)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks !
Fix #18.
Touch
class and into its own class,BlobDetector
testing_touch.cpp
to