Detecting a spike in an input signal using Java
I'm working on a project where, I need to control the mouse cursor by some accelerometer input. I'm using Java and have already completed the data collection part and I can开发者_如何学Python move the mouse according to accelerometer input successfully.
I also need to support mouse click events which are triggered by a sudden movement. So; this sudden movement creates a spike in the input signal (a wide one, not just single point). How can I detect such a spike using Java?
A properly tuned high-pass filter could do it, depending on your application. Really simple, 1 line of code.
High-pass filter
精彩评论