透视投影和Z缓冲一个三维头部,以形成一个面部图像 [英] Perspective Projection and Z-buffering of a 3D head to form a face image
问题描述
输入: 53490 3D点和头部的每个点(XYZ)和颜色(RGB)
Input: 53490 3D points and for each point (xyz) and color (rgb) of a head
输出:作为从一个特定位置/方向看2D的人脸图像
Output: 2D face image as viewed from a particular position / direction
平台: Matlab的C / C ++
Platform: Matlab C/C++
研究后,我发现在步骤以实施
After study, I found the steps to be implemented
- 透视投影 http://en.wikipedia.org/wiki/3D_projection 李>
- Z缓冲 http://en.wikipedia.org/wiki/Z-buffering一>
- 在海防反射模型 http://en.wikipedia.org/wiki/Phong_reflection_model
- Perspective Projection http://en.wikipedia.org/wiki/3D_projection
- Z-buffering http://en.wikipedia.org/wiki/Z-buffering
- Phong reflection model http://en.wikipedia.org/wiki/Phong_reflection_model
我实现了在Matlab中的上述3个步骤。但它需要8分钟的执行。二维渲染是我的项目的一部分;我会调用2D 5000次后呈现的一部分。我想在1秒的执行时间。
I implemented the above 3 steps in Matlab. But it takes 8 min for the execution. The 2D rendering is part of my project; I will be calling the 2D rendering part 5000 times later. I want the execution time under 1sec.
的时间的大部分(99.9%)被取为Z缓冲。实施完成后的维基链接。
谁能帮我减少时间在Matlab或建议其他平台?
任何教程/演示引用理解上面的步骤会有所帮助。
The bulk (99.9%) of time is taking for z-buffering. The implementation is done following the wiki link.
Can anyone help me to reduce the time in Matlab or suggest other platform?
Any tutorials/demo references to understand the above steps will be helpful.
在此先感谢
推荐答案
我不建议你在MATLAB中这样做,因为你可能需要一个形象化体积大。 尝试VTK,你可能需要一些程序。
I don't recommend you doing this in matlab, because you may need to visualize a big volume. Try vtk, and you may need some programming.
下面是一个简单的(3D项目)从ImageJ的: HTTP: //imagejdocu.tudor.lu/doku.php?id=gui:image:stacks
Here is a simple one (3D project) from ImageJ: http://imagejdocu.tudor.lu/doku.php?id=gui:image:stacks
这篇关于透视投影和Z缓冲一个三维头部,以形成一个面部图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!