# Old school voxel carving

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.

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

## 7 thoughts on “Old school voxel carving”

1. Haiyang Xu says:

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

2. Haiyang Xu says:

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. nghiaho12 says:

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. Haiyang Xu says:

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 ?

1. nghiaho12 says:

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

2. saouli abdelhak says:

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)

3. Pingback: Voxel Carving |