Skip to content
Snippets Groups Projects
Commit b2309902 authored by NicolaCovallero's avatar NicolaCovallero
Browse files

minot changes

parent 37e33e39
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -71,7 +71,6 @@ main (int argc, char ** argv)
}
// parameters for the LCCP segmentation
TableTop_Object_Detection seg;
tableTop_object_detection_parameters opt;
// ------------------- parsing the inputs ----------------------------
......@@ -104,9 +103,10 @@ main (int argc, char ** argv)
return (1);
}
//----------------------------------------
//TableTop_Object_Detection segLCCP;
TableTop_Object_Detection seg;
std::vector<Object> seg_objs; //("seg_objs" stands for "segmented objects")
seg.init(*cloud,opt);
//seg.init(*cloud);
seg.print_parameters();
seg.segment();
seg_objs = seg.get_segmented_objects();
......@@ -120,7 +120,7 @@ main (int argc, char ** argv)
// show super voxels with normals and adiacency map
bool show_adjacency_map = true;
bool show_super_voxel_normals = true;
bool show_super_voxel_normals = false;
seg.show_super_voxels(viewer,show_adjacency_map,show_super_voxel_normals);
std::cout << "Press 'n' to show the segmented objects\n";
......@@ -165,6 +165,8 @@ main (int argc, char ** argv)
cv::imshow("Original", img_orignal); //display the image which is stored in the 'img' in the "MyWindow" window
std::cout << "You are now viewing the RGB image (recovered by the point cloud)."
<< " Press whatever key to go further.";
cv::imwrite( "./original.jpg", img_orignal );
cv::waitKey(0);
// displaying in the RGB image what are the pixels of the rgb image related to the segmented objects
......@@ -217,6 +219,10 @@ main (int argc, char ** argv)
cv::imshow("Segmented Results", img); //display the image which is stored in the 'img' in the "MyWindow" window
std::cout << "Object: " << idx_v + 1 << " of " << seg_objs.size() << " objects." << std::endl;
std::stringstream ss;
ss << "img" << idx_v << ".jpg";
cv::imwrite( ss.str(), img );
k = cv::waitKey(0);
}
......
......@@ -35,7 +35,7 @@ typedef pcl::LCCPSegmentation<pcl::PointXYZRGBA>::SupervoxelAdjacencyList SuperV
struct Object
{
pcl::PointCloud<pcl::PointXYZRGBA> object_cloud;
int label;
int label; /**< label assigned by the lccp algorithm*/
};
#endif
......@@ -48,7 +48,7 @@ class tableTop_object_detection_parameters
protected:
// -------- Default Parameters --------
// supervoxels parameters
static const bool DISABLE_TRANSFORM = false; /**< default value of disable_transform for supervoxel algorithm*/
static const bool DISABLE_TRANSFORM = true; /**< default value of disable_transform for supervoxel algorithm*/
static const double VOXEL_RESOLUTION = 0.0075f;/**< default value of voxel_resolution for supervoxel algorithm*/
static const double SEED_RESOLUTION = 0.03f; /**< default value of seed_resolution for supervoxel algorithm*/
static const double COLOR_IMPORTANCE = 0.0f;/**< default value of color_importance for supervoxel algorithm*/
......@@ -129,7 +129,7 @@ class TableTop_Object_Detection
// -------- Default Parameters --------
// supervoxels parameters
static const bool DISABLE_TRANSFORM = false; /**< default value of disable_transform for supervoxel algorithm*/
static const bool DISABLE_TRANSFORM = true; /**< default value of disable_transform for supervoxel algorithm*/
static const double VOXEL_RESOLUTION = 0.0075f;/**< default value of voxel_resolution for supervoxel algorithm*/
static const double SEED_RESOLUTION = 0.03f; /**< default value of seed_resolution for supervoxel algorithm*/
static const double COLOR_IMPORTANCE = 0.0f;/**< default value of color_importance for supervoxel algorithm*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment