I’ve been working on an old school (circa early 90s) method of creating 3D models called voxel carving. As a first attempt I’m using an academic dataset that comes with camera projection matrices provided. The dataset is from

i am wondering how to determine voxel_origin and the cube size, when i get all of the projection matrices, can i assume that the voxel cube should be center of the cameras ? In your code I found that you have test the voxel grid projection to image, if I cannot choose a right position of the voxel cube relative to the camera sequences ,than the space carving may failed. would you please give me an explanation or some references.

What I did was load the 3D point cloud into Meshlab and look at the bounding box and manually typed in the co-ordinates. You can maybe try and figure out the position of the cameras, which gives you a 2D bounding rectangle, and take a guess at the height based on some heuristic.

I have an idea, that we can get the camera position from projection matrix . so I have a sequence of points in 3D, then compute the center of these points and set it the center of voxel box . Do you think that’s feasible ?

Well the easiest way to do this is to get the position of all cameras and than chose the max along the x and y for the z you have to see where the cameras are looking (directions)

Thank you for your wonderful demos this and others. Those examples give me a lot of help!

i am wondering how to determine voxel_origin and the cube size, when i get all of the projection matrices, can i assume that the voxel cube should be center of the cameras ? In your code I found that you have test the voxel grid projection to image, if I cannot choose a right position of the voxel cube relative to the camera sequences ,than the space carving may failed. would you please give me an explanation or some references.

What I did was load the 3D point cloud into Meshlab and look at the bounding box and manually typed in the co-ordinates. You can maybe try and figure out the position of the cameras, which gives you a 2D bounding rectangle, and take a guess at the height based on some heuristic.

I have an idea, that we can get the camera position from projection matrix . so I have a sequence of points in 3D, then compute the center of these points and set it the center of voxel box . Do you think that’s feasible ?

I think this will be ok if the camera is consistent distance away from the object.

Well the easiest way to do this is to get the position of all cameras and than chose the max along the x and y for the z you have to see where the cameras are looking (directions)