I have a problem drawing the tips of the fingers based on the Leap Motion data. I have the device mounted next to a webcam, both duct-taped on an OSVR HDK2. The webcam data is retrieved with OpenCV and drawn with OpenGL. Calibrating the fingers seems to be difficult as the drawn locations are either too far left when the hand is on the left side of the picture, or too far right on the right side. Same thing happens with up/down. I convert the coordinates according to this guide. I've tried:
- Both of the conversion methods in the guide.
- Converting according to width/height of the CV Mat image and also the GLFW image.
- Drawing on the CV mat which is later translated to a GLFW texture.
- Drawing on the GLFW window directly after the webcam image has been rendered.
- Manully changing offsets and scales (multiplying and/or adding a fixed amount of pixels).
- Translating the coordinates manually, without the Leap Motion 'slopes'.
Could this simply be a problem with the webcam image? Happy to post pieces of code if needed.