openframeworks - saving kinect reconstructed 3d view into a file -


i'm going run project; reconstruct room kinect.

in format 3d reconstructed view saved ?

could save or convert 3dm, 3ds, max, obj , etc ?

thanks!

you can save 3d coordinates ply format. here's basic example using ofxkinect:

void exportplycloud(string filename, ofmesh& cloud) {     offile ply;     if (ply.open(filename, offile::writeonly)) {                 // write header         ply << "ply" << endl;         ply << "format binary_little_endian 1.0" << endl;         ply << "element vertex " << cloud.getvertices().size() << endl;         ply << "property float x" << endl;         ply << "property float y" << endl;         ply << "property float z" << endl;         ply << "end_header" << endl;          // write vertices         vector<ofvec3f>& surface = cloud.getvertices();         for(int = 0; < surface.size(); i++) {             if (surface[i].z != 0) {                 // write raw data if stream of bytes                 ply.write((char*) &surface[i], sizeof(ofvec3f));             }         }     } } 

you can use meshlab process/stich ply files , export them format obj. related openframeworks, can find few handy examples including above ply export in workshop.

saving ply solve part of problem , you'd need manually stich can time consuming. need slam(simultaneous localization , mapping) or other reconstruction algorithms stitch things together. can find nice collection of algorithm on openslam.

now depending on level of comfort coding there few options that. recommend having @ rgbdemo built software has reconstruction feature. requires no coding, unless want (as it's opensource).

with bit of coding can reconstruction using pointcloudslibrary(pcl). if includes implementation of kinectfusion

pcl kinfu preview 1 pcl kinfu preview 2

if you're using microsoft kinect sdk, kinect fusion integrated kinect sdk 1.7

kinectfusion in kinect sdk 1.7

you might find post interesting: kinect fusion inside autocad.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -