English 中文(简体)
对比屏幕和开放式全球坐标,以获得点击
原标题:Compare screen and OpenGL s real world coordinates to get a hit

我们基本掌握的是开放式GL物体的模型矩阵表,它为我们提供了轮换和翻译矢量,用一些计算得出了我们的实际立场:

-R*t,其中R为[0 4 8; 1 5 9; 2 6 10] 矩阵和t为[12 13 14]栏矢量。

In OpenCV we have screen coordinates x,y of the fingertip.

现在,我们需要某种方法,将这种屏幕的<代码>x,y与开放式全球坐标相比较,看看哪个物体确实点击。 我们尝试了<代码>glu Un Project,但并未从Xy中恢复正确的世界坐标。

在这里尝试的方法是什么,它正在使用ARToolKit和开放式CV,索模拟根据AR标记的变化矩阵。 我们还使用ARToolkit照相机模块。

问题回答

Well, let me see: You ve got two knowns for a system of 3 linear independent equations. So you re literally missing some information. You have a free parameter z, and if you think about it, what this gives you is not a position in space, but a ray into it (from the camera into some direction to infinity). You can gluUnProject for z=0 and z=1, which gives you two points on the ray. Then you can use that ray to test if it crosses some of your objects.

或你以其他方式: 您将每一物体的捆绑量用于对空间(x,y)进行筛选,并测试你的inger子坐标。 稍后我发言。





相关问题
OpenGL 3D Selection

I am trying to create a 3D robot that should perform certain actions when certain body parts are clicked. I have successfully (sort of) implemented picking in that if you click on any x-plane part, it ...

CVDisplayLink instead of NSTimer

I have started to implement cvDisplayLink to drive the render loop instead of nstimer, as detailed in this technical note https://developer.apple.com/library/archive/qa/qa1385/_index.html Is it ...

Can the iPhone simulator handle PVR textures?

I have a really weird problem with PVR textures on the iPhone simulator- the framerate falls through the floor on the iPhone simulator, but on the iPhone itself it works just fine. Has anyone had any ...

Calculate fps (frames per second) for iphone app

I am using an opengl es iphone application. What is the most accurate way to calculate the frames per second of my application for performance tuning?

Java - Zoom / 3D Data Visualization Libraries

What are the best libraries/frameworks for doing 3D and/or Zoom interfaces in Java? I d like to be able to do some prototyping of creating new types of interfaces for navigating within data and ...

FLTK in Cygwin using Eclipse (Linking errors)

I have this assignment due that requires the usage of FLTK. The code is given to us and it should compile straight off of the bat, but I am having linking errors and do not know which other libraries ...

热门标签