Переглянути джерело

change perception_camera_yolo.

yuchuli 4 місяців тому
батько
коміт
64cc568a3e
1 змінених файлів з 4 додано та 1 видалено
  1. 4 1
      src/api/perception_camera_yolo/main.cpp

+ 4 - 1
src/api/perception_camera_yolo/main.cpp

@@ -74,7 +74,7 @@ void embed_image(image source, image dest, int dx, int dy)
     }
 }
 
-void draw_detections(image im, detection *dets, int num, float thresh, char **names, image **alphabet, int classes)
+void draw_detections1(image  im, detection *dets, int num, float thresh, char **names, image **alphabet, int classes)
 {
     int i,j;
 
@@ -206,8 +206,11 @@ void dodetec(cv::Mat mat)
     printf("Predicted in %f seconds.\n", what_time_is_it_now()-time);
 
     int nboxes = 0;
+    float thresh = 0.5;
     detection *dets = get_network_boxes(gpnet, im.w, im.h, 0.5, 0.5, 0, 1, &nboxes);
 
+    draw_detections1(im, dets, nboxes, thresh, nullptr, nullptr, l.classes);
+
     std::cout<<" nbox: "<<nboxes<<std::endl;
 
     free_image(im);