Home › Forums › Community Projects › Clippy: accurate mouse control › Reply To: Clippy: accurate mouse control
A grid is an interesting idea, thanks! It’s similar to the calibration I was doing using arbitrary points. Bad data can still get into the grid, eg if you look at a position then use head tracking to place the mouse at a different position. However, I like that with a grid it’s easier to fix: setting a new head tracking offset erases the bad data for the grid cells involved. With arbitrary points, I didn’t have a way of deleting bad offsets.
I gave using a grid a whirl. When head tracking is used to adjust the mouse, I store the offset in a cell for the initial gaze point. When using the gaze point to position the mouse, I find the cell for the gaze point (green) and the 3 other cells around it (using cell centers):
I use the offset of these 4 cells to interpolate an offset for the gaze point at pixel granularity. The mouse gets placed at the gaze point + this offset. It seems to work pretty well! I need to live with it for a while, but I may not even need the snapping I described earlier.
I see your grid is 8×6, though you do the weighting differently. I’m using 35×20 but haven’t experimented a whole lot. When I store the offset for a cell, I also store 66% of the offset in the surrounding 8 cells. This helps spread the offset out, with interpolation spreading it further. I initially tried a less dense grid without this, but didn’t like how it interpolated from a cell’s center to the next cell’s center when the next cell’s offset was zero.
Code is in my Tobii class:
https://github.com/EsotericSoftware/clippy/blob/master/src/com/esotericsoftware/clippy/Tobii.java
For dragging I’m hesitant to have more than one hotkey or more hardware like a pedal. I think I can use a hotkey release then quickly press again and hold to start a drag, similar to a touchpad.
For double click I think I can use a hotkey release then quickly press and release again. The second release would click a second time without triggering mouse movement.
Animating the gaze jump is a good idea, thanks. I don’t use it much, since I normally look then hit the hotkey. However, I have noticed it can be confusing when the mouse is gaze jumped to the bottom of the screen. The mouse cursor can’t be seen at the bottom of the screen, so it appears like the mouse cursor has simply disappeared. Animating it into position would help the user understand what happened.
Maybe I’m some kind of bobble head, but with mouse head tracking always enabled I get annoyed by the mouse cursor moving around as my head moves. I end up trying to keep still, which is fatiguing.