Subversion Repositories seema-scanner

Rev

Rev 91 | Rev 139 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 91 Rev 128
Line 35... Line 35...
35
    // this leads to a segfault on OS X
35
    // this leads to a segfault on OS X
36
    visualizer->setCameraPosition(0,0,-50,0,0,0,0,-1,0);
36
    visualizer->setCameraPosition(0,0,-50,0,0,0,0,-1,0);
37
#endif
37
#endif
38
 
38
 
39
    // Initialize point cloud color handler
39
    // Initialize point cloud color handler
40
    colorHandler = new pcl::visualization::PointCloudColorHandlerRGBField<pcl::PointXYZRGB>();
40
    colorHandler = new pcl::visualization::PointCloudColorHandlerRGBField<pcl::PointXYZRGBNormal>();
41
 
41
 
42
    updateCalibrationParameters();
42
    updateCalibrationParameters();
43
    //time.start();
43
    //time.start();
44
}
44
}
45
 
45
 
Line 116... Line 116...
116
//        pcl::io::savePCDFileASCII(fileName.toStdString(), *pointCloudPCL);
116
//        pcl::io::savePCDFileASCII(fileName.toStdString(), *pointCloudPCL);
117
//    } else if(type == "ply"){
117
//    } else if(type == "ply"){
118
//        //pcl::io::savePLYFileBinary(fileName.toStdString(), *pointCloudPCL);
118
//        //pcl::io::savePLYFileBinary(fileName.toStdString(), *pointCloudPCL);
119
//        pcl::PLYWriter w;
119
//        pcl::PLYWriter w;
120
//        // Write to ply in binary without camera
120
//        // Write to ply in binary without camera
121
//        w.write<pcl::PointXYZRGB> (fileName.toStdString(), *pointCloudPCL, true, false);
121
//        w.write<pcl::PointXYZRGBNormal> (fileName.toStdString(), *pointCloudPCL, true, false);
122
//    } else if(type == "vtk"){
122
//    } else if(type == "vtk"){
123
//        pcl::PCLPointCloud2 pointCloud2;
123
//        pcl::PCLPointCloud2 pointCloud2;
124
//        pcl::toPCLPointCloud2(*pointCloudPCL, pointCloud2);
124
//        pcl::toPCLPointCloud2(*pointCloudPCL, pointCloud2);
125
//        pcl::io::saveVTKFile(fileName.toStdString(), pointCloud2);
125
//        pcl::io::saveVTKFile(fileName.toStdString(), pointCloud2);
126
 
126
 
Line 134... Line 134...
134
//        pcl::io::savePNGFile(fileName.toStdString(), *pointCloudPCL, "rgb");
134
//        pcl::io::savePNGFile(fileName.toStdString(), *pointCloudPCL, "rgb");
135
//    } else if(type == "txt"){
135
//    } else if(type == "txt"){
136
//        std::ofstream s(fileName.toLocal8Bit());
136
//        std::ofstream s(fileName.toLocal8Bit());
137
//        for(unsigned int r=0; r<pointCloudPCL->height; r++){
137
//        for(unsigned int r=0; r<pointCloudPCL->height; r++){
138
//            for(unsigned int c=0; c<pointCloudPCL->width; c++){
138
//            for(unsigned int c=0; c<pointCloudPCL->width; c++){
139
//                pcl::PointXYZRGB p = pointCloudPCL->at(c, r);
139
//                pcl::PointXYZRGBNormal p = pointCloudPCL->at(c, r);
140
//                if(p.x == p.x)
140
//                if(p.x == p.x)
141
//                    s << p.x << " " << p.y << " " << p.z << "\r\n";
141
//                    s << p.x << " " << p.y << " " << p.z << "\r\n";
142
//            }
142
//            }
143
//        }
143
//        }
144
//        std::flush(s);
144
//        std::flush(s);