Explorar o código

change detection/detection_lidar_pointpillars_multihead. now test in x86 is ok.

yuchuli %!s(int64=3) %!d(string=hai) anos
pai
achega
47b0159f1f

+ 5 - 5
src/detection/detection_lidar_PointPillars_MultiHead/main.cpp

@@ -19,9 +19,9 @@ void PclToArray(
     float* out_points_array, const float normalizing_factor) {
   for (size_t i = 0; i < in_pcl_pc_ptr->size(); ++i) {
     pcl::PointXYZI point = in_pcl_pc_ptr->at(i);
-    out_points_array[i * 3 + 0] = point.x;
-    out_points_array[i * 3 + 1] = point.y;
-    out_points_array[i * 3 + 2] = point.z;
+    out_points_array[i * 4 + 0] = point.x;
+    out_points_array[i * 4 + 1] = point.y;
+    out_points_array[i * 4 + 2] = point.z;
     out_points_array[i * 4 + 3] =
         static_cast<float>(point.intensity / normalizing_factor);
   }
@@ -107,9 +107,9 @@ void test(std::string pfe_file,std::string backbone_file,std::string pp_config)
 
 
     float* points_array = new float[xpc->size() * kNumPointFeature];
-    PclXYZITToArray(xpc, points_array, 255.0);
+    PclXYZITToArray(xpc, points_array, 1.0);
 
-    int    in_num_points = in_num_points;
+    int    in_num_points = xpc->width;
 
     std::vector<float> out_detections;
     std::vector<int> out_labels;