#include "common/pipeline/ObjectDetector.h"
#include "common/pipeline/ODDetection.h"
#include "detectors/global3D/ODPointCloudGlobalMatching.h"
#include "common/utils/ODFrameGenerator.h"
int main(int argc, char *argv[])
{
std::string training_input_dir(argv[1]), trained_data_dir(argv[2]);
pcl::visualization::PCLVisualizer vis ("kinect");
od::ODFrameGenerator<od::ODScenePointCloud<pcl::PointXYZRGBA>, od::GENERATOR_TYPE_DEVICE> frameGenerator;
while(frameGenerator.isValid())
{
frame = frameGenerator.getNextFrame();
vis.removeAllPointClouds();
vis.removeAllShapes();
vis.addPointCloud<pcl::PointXYZRGBA> (frame->
getPointCloud(),
"frame");
for (size_t i = 0; i < detections->size (); i++)
{
std::stringstream cluster_name;
cluster_name << "cluster_" << i;
pcl::visualization::PointCloudColorHandlerRandom<pcl::PointXYZ> random_handler (detections->at(i)->getMetainfoCluster());
vis.addPointCloud<pcl::PointXYZ> (detections->at(i)->getMetainfoCluster(), random_handler, cluster_name.str ());
pcl::PointXYZ pos; pos.x = detections->at(i)->getLocation()[0]; pos.y = detections->at(i)->getLocation()[1]; pos.z = detections->at(i)->getLocation()[2];
vis.addText3D (detections->at(i)->getId(), pos, 0.015f, 1, 0, 1, cluster_name.str() + "_txt", 0);
}
vis.spinOnce ();
}
return 0;
}