Old school voxel carving

Last Updated on March 30, 2014 by nghiaho12

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

http://www.cs.wustl.edu/~furukawa/research/mview/index.html

specifically the Predator dataset (I have a thing for Predator).

Here it is in action

Screen recording was done using SimpleScreenRecorder, which was slick and easy to use.

Download VoxelCarving.tar.gz

You will need OpenCV installed and the Predator images. Instructions can be found in the README.txt.

9 thoughts on “Old school voxel carving”

  1. 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.

    1. 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.

      1. 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 ?

    2. 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)

  2. Pingback: Voxel Carving |
  3. Hi!

    I’ve been trying to use this with different photos, but have been getting random results.

    How did you form the projection matrices for this example?

    Thank you for all you have shared. It has been very educational to me.

Leave a Reply to saouli abdelhak Cancel reply

Your email address will not be published. Required fields are marked *