问题描述
大家好,
我现在遇到了一个重大问题。我正在使用kinect融合来捕获3D场景并将其输出为.OBJ文件。
I have a major problem right now. I was using the kinect fusion to capture a 3D scene and output it as an .OBJ file.
该文件的输出如下所示:
The output of the file looks something like this:
v 123 123 123
$
v 123 123 123
v 123 123 123
vn 321 321 321
vn 321 321 321
vn 321 321 321
f 1 // 1 2 // 2 3 // 3
v 123 123 123
v 123 123 123
v 123 123 123
vn 321 321 321
vn 321 321 321
vn 321 321 321
f 1//1 2//2 3//3
其中v是顶点,vn是正常的,f是面部。 3个顶点组成一个面,因此面的数量是顶点数的1/3。但问题是kinect的输出并没有将顶点合并在一起。所以在我将它导入maya
并将它们合并在一起后,顶点和顶点法线的数量会以某种方式变得不同!
Where v is the vertice, vn is normal, and f is the face. 3 vertices makes up a face, so the number of face is exacely 1/3 the number of vertices. But the problem is the output from kinect doesnt merge the vertices together. So after i import it into maya and merge them together, the number of vertice and vertice normals somehow become different!
合并后的顶点数:52837
合并后正常的顶点数:299997
合并后的面数:99999
Number of vertice after merge: 52837
Number of vertice normal after merge: 299997
Number of face after merge: 99999
这怎么可能!?不应该每个顶点只有1个顶点正常吗?为什么比顶点更正常?我编写的代码只有遵循该结构才能工作。另一种方法是不将顶点合并在一起,但将来可能会给我造成
的问题。
How is that possible!? Shouldn't each vertice only have 1 vertice normal? Why is there more normal than vertices? The code that i wrote can only work if it follows that structure. Another way is to not merge the vertices together, but it may cause problems for me in the future.
希望有人可以帮助我T_T
Hope someone can help me T_T
推荐答案
这篇关于顶点未合并(Kinect Furion输出)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!