avanindra / EPVH

Implementation of Exact Polyhedral Visual Hull
Other
15 stars 10 forks source link

The demo outputs no polyhedra #5

Open autosquid opened 8 years ago

autosquid commented 8 years ago

After a few minor fixes, the demo works on my mac. I checked the polyhedra calculated with the provided dataset, but it seems the polyhedra is empty, i.e. with 0 vertices.

The following is the output from demo:

 reading completed 48
24 23
 number of silhouette cams : 23
 primitives built
 generator normals computed
 clippers built
 camera : 0
 camera : 1
 camera : 2
 camera : 3
 camera : 4
 camera : 5
 camera : 6
 camera : 7
 camera : 8
 camera : 9
 camera : 10
 camera : 11
 camera : 12
 camera : 13
 camera : 14
 camera : 15
 camera : 16
 camera : 17
 camera : 18
 camera : 19
 camera : 20
 camera : 21
 camera : 22
 viewing edges initialized
 viewing edges associated with generators
 vertices initialized , statrting polygon computation
 visual hull computed

When I check the polygons with GetNumberOfVerts, the result is 0.

And the vtk window does not appear in my case, which I think is related to my vtk library configuration.

autosquid commented 8 years ago

I further checked, and find mVertexChainCounter in generatePolygons exceeds 5000, causing an early false return with ss=0.

avanindra commented 8 years ago

OK , I am testing the code on OS X , the issue is replicated on my system. I will get back to you on this.

avanindra commented 8 years ago

I tested the code on Visual studio 2013 on windows , where it worked fine. Just for testing purposes , as POC , you can run it with msvc , where it would produce the output.

avanindra commented 8 years ago

ok , I made few changes in buildVisualHull method . Now it is currently producing output. It contains several holes though. I will check it later for possible issues. But for now I think , the core runs till the end and displays the output. Please let me know if you still face problems.

autosquid commented 8 years ago

Yeah, it is generating output. Here is what I got on my mac:

http://snag.gy/F97xg.jpg

The mesh seems broken. some faces are degenerated. Is it the same with you?

What is more, the vertex number of the mesh is 0 here, with number of cells 21444 (after triangulation).

avanindra commented 8 years ago

Yeah , I got the same output. Don't be alarmed with number of vertices , vtk treats points and vertices differently , I should have printed GetNumberOfPoints() instead of GetNumberOfVerts(). I will work on the mesh issue , when I get some time. Meanwhile if you can find any bug at any stage , do notify. I would be happy to explain anything in the code.