Przeglądaj źródła

修改图片等待时间

fujiankuan 2 lat temu
rodzic
commit
fe5e7bf02c
1 zmienionych plików z 9 dodań i 9 usunięć
  1. 9 9
      src/detection/trafficlight_detection/main.cpp

+ 9 - 9
src/detection/trafficlight_detection/main.cpp

@@ -767,14 +767,14 @@ int main(int argc, char** argv)
                 {
                     double waittotal = (double)cv::getTickCount() - waittime;
                     double totaltime = waittotal/cv::getTickFrequency();
-                    if(totaltime>10.0)
-                    {
-                        cout<<"Cant't get frame and quit"<<endl;
-                        lightstart = false;
-                        cv::destroyAllWindows();
-                        std::cout<<"------end program------"<<std::endl;
-                        break;
-                    }
+//                    if(totaltime>120.0)
+//                    {
+//                        cout<<"Cant't get frame and quit"<<endl;
+//                        lightstart = false;
+//                        cv::destroyAllWindows();
+//                        std::cout<<"------end program------"<<std::endl;
+//                        break;
+//                    }
                     cout<<"Wait for frame "<<totaltime<<"s"<<endl;
                     continue;
                 }
@@ -878,7 +878,7 @@ int main(int argc, char** argv)
                 }
 
                 //writer << frame;
-                //waittime = (double)cv::getTickCount();
+                waittime = (double)cv::getTickCount();
                 if(!lightstart)
                 {
                     cv::destroyAllWindows();