Pārlūkot izejas kodu

修改: modules/InfineFilter/src/InfineFilter.cpp
修改: modules/osd/src/cnosd.cpp
修改: source/cns_launcher/configs/InfineFilter.json

Your Name 2 gadi atpakaļ
vecāks
revīzija
05fb8655d9

+ 2 - 2
modules/InfineFilter/src/InfineFilter.cpp

@@ -4,7 +4,7 @@
  * @Autor: lishengyin
  * @Date: 2022-03-22 14:00:46
  * @LastEditors: lishengyin
- * @LastEditTime: 2022-06-28 11:13:49
+ * @LastEditTime: 2022-07-21 14:17:36
  */
 #include "InfineFilter.h"
 
@@ -203,7 +203,7 @@ namespace cnstream{
         if(Proportion > this->Proportion_th) {
             if(this->saveFilterResult){
                 cv::Mat img = image.clone();
-                for(auto iter = objs_holder->objs_.begin(); iter != objs_holder->objs_.end(); ){
+                for(auto iter = objs_holder->objs_.begin(); iter != objs_holder->objs_.end(); iter++){
                     std::shared_ptr<cnstream::CNInferObject> object = *iter;
                     if (!object) continue;
                     cv::Point top_left;

+ 1 - 0
modules/osd/src/cnosd.cpp

@@ -286,6 +286,7 @@ void CnOsd::DrawText(cv::Mat image, const cv::Point& bottom_left, const std::str
   if (text_height) *text_height = text_size.height + baseline;
 }
 
+
 int CnOsd::CalcThickness(int image_width, float thickness) const {
   int result = thickness * image_width / 300;
   if (result <= 0) result = 1;

+ 1 - 1
source/cns_launcher/configs/InfineFilter.json

@@ -8,7 +8,7 @@
                 "label":["1"]
             },
             "AlienLabels":{
-                "label":["1,2"]
+                "label":["1", "2"]
             },
             "files": "./output/",
             "saveFilterResult" : "true",