Code covered by the BSD License  

Highlights from
3D voxelizer

5.0

5.0 | 2 ratings Rate this file 35 Downloads (last 30 days) File Size: 2.43 MB File ID: #21044
image thumbnail

3D voxelizer

by Carlos Martinez-Ortiz

 

12 Aug 2008 (Updated 27 Aug 2008)

Provides functionality to convert a 3D object to voxel representation.

| Watch this File

File Information
Description

This package provides functionalities for loading 3D models from .OBJ files and convert them to a voxel representation. The space is divided in a discrete grid, and the grid cells which intersect the given object are marked as occupied. The occupied cells then form the voxel representation of the object. A plot function is also included to allow visualization of the voxel representation.

MATLAB release MATLAB 7.4 (R2007a)
Other requirements Requires Java 1.5
Tags for This File  
Everyone's Tags
3d modeling, discrete representation, image analysis, image processing, voxels(2)
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
16 May 2009 Erman Engin

Hi,
Thanks for the code. My application needs different object in the .obj file to be distingishable after voxelization. To give an example to make the problem more clear: Say that there is a glass filled with water as 3D model and I saved this as an .obj file. So in the .obj file Glass is one object and water inside is another object (which is a cylinder in fact). After voxelization I want to get a 3D matrix saying either 'G' for glass or 'W' for water and 'A' for air, in its cells.

Is there a way to achieve this using your code? Does your code handles different objects in the .obj file seperately?

Thanks

18 Oct 2008 Mohammad Hashemian

Hi there,
First thanks for your convertor, I was looking for such a thing for a long time.
But this doesn't work un unclosed objects. I read the comments inside m file, it seems that its not possible to do this, I just want to know is there any way to work on unclosed objects too?

27 Aug 2008 jichao zhao

Thank you very much for your sharing, yes, it is working now, it is an excellent work!!!
I will play with it more, and apply this to my current work.

27 Aug 2008 Carlos Martinez-Ortiz

Jichao,

I think the java class is being used before it is imported. If you add "importAOIJava('voxelizer');" at the beginning of your code, this error should be solved. I'll fix this and upload a corrected version shortly.

19 Aug 2008 jichao zhao

I tried, but it failed to work for both R2006b
under linux and R2007b under wins. And the problem is same:

??? Undefined variable "neo" or class "neo.aoi.RoundUtils.getRoundingPlaces".

Error in ==> voxelize at 48
res = neo.aoi.RoundUtils.round(res, neo.aoi.RoundUtils.getRoundingPlaces(res));

Updates
27 Aug 2008

Fixes bug reported by Jichao Zhao and includes an optimization to plot3D suggested by Gianni Schena.

Contact us