What basically we have is modelview matrix of an OpenGL object,which gives us Rotation and Translation vectors,using these we get the real position with some calculations:
-R*t, where R is [0 4 8; 1 5 9; 2 6 10] matrix and t is [12 13 14] column vector.
In OpenCV we have screen coordinates x,y
of the fingertip.
Now we need some method to compare this x,y
of screen with OpenGL's real world coordinates to see which object did finger hit. We have tried gluUnProject
but it did not return correct real world coordinates from the x,y.
What is the method to try here,this is using ARToolKit and OpenCV together,so modelview matrices change based on markers of AR. Also we are using ARToolkit camera module.