@@ -70,8 +70,8 @@ void DNNDetector::Detect(cv::UMat& colorFrame)
7070 cv::Mat detection = m_net.forward (" detection_out" ); // compute output
7171
7272 std::vector<double > layersTimings;
73- double freq = cv::getTickFrequency () / 1000 ;
74- double time = m_net.getPerfProfile (layersTimings) / freq;
73+ // double freq = cv::getTickFrequency() / 1000;
74+ // double time = m_net.getPerfProfile(layersTimings) / freq;
7575
7676 cv::Mat detectionMat (detection.size [2 ], detection.size [3 ], CV_32F , detection.ptr <float >());
7777
@@ -98,12 +98,12 @@ void DNNDetector::Detect(cv::UMat& colorFrame)
9898
9999 cv::Rect object ((int )xLeftBottom, (int )yLeftBottom, (int )(xRightTop - xLeftBottom), (int )(yRightTop - yLeftBottom));
100100
101- m_regions.push_back (object);
101+ m_regions.push_back (CRegion ( object, classNames[objectClass], confidence) );
102102
103103 // cv::rectangle(frame, object, Scalar(0, 255, 0));
104- std::string label = classNames[objectClass] + " : " + std::to_string (confidence);
105- int baseLine = 0 ;
106- cv::Size labelSize = cv::getTextSize (label, cv::FONT_HERSHEY_SIMPLEX , 0.5 , 1 , &baseLine);
104+ // std::string label = classNames[objectClass] + ": " + std::to_string(confidence);
105+ // int baseLine = 0;
106+ // cv::Size labelSize = cv::getTextSize(label, cv::FONT_HERSHEY_SIMPLEX, 0.5, 1, &baseLine);
107107 // cv::rectangle(frame, cv::Rect(cv::Point(xLeftBottom, yLeftBottom - labelSize.height), cv::Size(labelSize.width, labelSize.height + baseLine)), cv::Scalar(255, 255, 255), CV_FILLED);
108108 // cv::putText(frame, label, Point(xLeftBottom, yLeftBottom), cv::FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(0,0,0));
109109 }
0 commit comments