透视投影和Z头缓冲3D头形成面部图像 [英] 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
- Z缓冲 http://en.wikipedia.org/wiki/Z-buffering
- Phong反射模型 http://en.wikipedia.org/ wiki / Phong_reflection_model
< a href =http://en.wikipedia.org/wiki/3D_projection =nofollow> http://en.wikipedia.org/wiki/3D_projection
- 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次以后调用2D渲染部分。我希望执行时间低于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缓冲。实现是在wiki链接之后完成的。
任何人都可以帮助我减少在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.
这里是一个来自ImageJ的简单的3D项目: 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头缓冲3D头形成面部图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!