diff --git a/Makefile.Debug b/Makefile.Debug index 1d90f17..7b173a8 100644 --- a/Makefile.Debug +++ b/Makefile.Debug @@ -528,12 +528,14 @@ debug\moc_widget.cpp: widget.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qhostaddress.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\QTcpServer \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qtcpserver.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QPushButton \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qpushbutton.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractbutton.h \ globals.h \ ..\..\Desktop\cotton_double\Include\MIL.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QMutex \ + img_utils.h \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\QPixmap \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QPushButton \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qpushbutton.h \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractbutton.h \ debug\moc_predefs.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\bin\moc.exe C:\Qt\6.7.3\msvc2022_64\bin\moc.exe $(DEFINES) --compiler-flavor=msvc --include C:/Users/Administrator/Documents/cotton_double/debug/moc_predefs.h -IC:/Qt/6.7.3/msvc2022_64/mkspecs/win32-msvc -IC:/Users/Administrator/Documents/cotton_double -IC:/Users/Administrator/Desktop/cotton_double/Include -ID:/opencv/opencv410-vs22/include -IC:/Qt/6.7.3/msvc2022_64/include -IC:/Qt/6.7.3/msvc2022_64/include/QtWidgets -IC:/Qt/6.7.3/msvc2022_64/include/QtGui -IC:/Qt/6.7.3/msvc2022_64/include/QtNetwork -IC:/Qt/6.7.3/msvc2022_64/include/QtCore -I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include" -I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\ATLMFC\include" -I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" -I"C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" -I"C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" -I"C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" widget.h -o debug\moc_widget.cpp @@ -870,6 +872,9 @@ debug\camera.obj: camera.cpp camera.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qdeadlinetimer.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qelapsedtimer.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qtsan_impl.h \ + img_utils.h \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\QPixmap \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qpixmap.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QTimer \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qtimer.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qbasictimer.h @@ -1009,7 +1014,120 @@ debug\globals.obj: globals.cpp globals.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qobjectdefs_impl.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qfunctionaltools_impl.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qscopeguard.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qtsan_impl.h + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qtsan_impl.h \ + D:\opencv\opencv410-vs22\include\opencv2\opencv.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\opencv_modules.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\cvdef.h \ + D:\opencv\opencv410-vs22\include\opencv2\core\version.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\hal\interface.h \ + D:\opencv\opencv410-vs22\include\opencv2\core\cv_cpu_dispatch.h \ + D:\opencv\opencv410-vs22\include\opencv2\core\cv_cpu_helper.h \ + D:\opencv\opencv410-vs22\include\opencv2\core\hal\msa_macros.h \ + D:\opencv\opencv410-vs22\include\opencv2\core\fast_math.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\base.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\cvstd.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\cvstd_wrapper.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\neon_utils.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\vsx_utils.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\check.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\traits.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\matx.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\saturate.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\matx.inl.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\types.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\mat.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\bufferpool.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\mat.inl.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\persistence.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\operations.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\cvstd.inl.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\utility.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\utils\instrumentation.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\utils\tls.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\optim.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\ovx.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\calib3d.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\features2d.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\flann\miniflann.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\flann\defines.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\config.h \ + D:\opencv\opencv410-vs22\include\opencv2\core\affine.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\utils\logger.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\utils\logger.defines.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\utils\logtag.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\dnn.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\dnn\dnn.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\async.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\dnn\version.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\dnn\dict.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\dnn\layer.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\dnn\dnn.inl.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\dnn\utils\inference_engine.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\flann.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\flann\flann_base.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\flann\general.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\matrix.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\params.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\any.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\saving.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\nn_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\result_set.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\all_indices.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\kdtree_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\dynamic_bitset.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\dist.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\heap.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\allocator.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\random.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\kdtree_single_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\kmeans_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\logger.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\composite_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\linear_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\hierarchical_clustering_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\lsh_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\lsh_table.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\autotuned_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\ground_truth.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\index_testing.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\timer.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\sampling.h \ + D:\opencv\opencv410-vs22\include\opencv2\highgui.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\imgcodecs.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\videoio.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\imgproc.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\imgproc\segmentation.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\ml.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\ml\ml.inl.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect\aruco_detector.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect\aruco_dictionary.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect\aruco_board.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect\graphical_code_detector.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect\detection_based_tracker.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect\face.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect\charuco_detector.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect\barcode.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\photo.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\warpers.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\warpers.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\cuda.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\cuda_types.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\cuda.inl.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\warpers_inl.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\matchers.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\motion_estimators.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\util.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\util_inl.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\camera.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\exposure_compensate.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\seam_finders.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\blenders.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\video.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\video\tracking.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\video\background_segm.hpp debug\img_utils.obj: img_utils.cpp img_utils.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\QPixmap \ @@ -1273,49 +1391,7 @@ debug\img_utils.obj: img_utils.cpp img_utils.h \ ..\..\Desktop\cotton_double\Include\ClassicMIL\MILDyn\milreg.h \ ..\..\Desktop\cotton_double\Include\ClassicMIL\MILDyn\milstr.h \ ..\..\Desktop\cotton_double\Include\ClassicMIL\MILDyn\PFNC.h \ - ..\..\Desktop\cotton_double\Include\ClassicMIL\milfuncll.h \ - camera.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QObject \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qobject.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qcoreevent.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qmetatype.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qcompare.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qcomparehelpers.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qfloat16.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qmath.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qiterable.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qmetacontainer.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qcontainerinfo.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qtaggedpointer.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qscopeguard.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qobject_impl.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qbindingstorage.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QQueue \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qqueue.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QDebug \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qdebug.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qtextstream.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qcontiguouscache.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qsharedpointer.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qsharedpointer_impl.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qmap.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qshareddata_impl.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qset.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qhash.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qvarlengtharray.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QString \ - onnxrunner.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\QTcpSocket \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qtcpsocket.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qtnetworkglobal.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qtnetwork-config.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qtnetworkexports.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qabstractsocket.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qhostaddress.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qiodevice.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qvariant.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\QTcpServer \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qtcpserver.h + ..\..\Desktop\cotton_double\Include\ClassicMIL\milfuncll.h debug\main.obj: main.cpp widget.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QWidget \ @@ -1673,12 +1749,14 @@ debug\main.obj: main.cpp widget.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qhostaddress.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\QTcpServer \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qtcpserver.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QPushButton \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qpushbutton.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractbutton.h \ globals.h \ ..\..\Desktop\cotton_double\Include\MIL.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QMutex \ + img_utils.h \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\QPixmap \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QPushButton \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qpushbutton.h \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractbutton.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QApplication \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qapplication.h @@ -2260,12 +2338,14 @@ debug\widget.obj: widget.cpp widget.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qhostaddress.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\QTcpServer \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qtcpserver.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QPushButton \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qpushbutton.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractbutton.h \ globals.h \ ..\..\Desktop\cotton_double\Include\MIL.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QMutex \ + img_utils.h \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\QPixmap \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QPushButton \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qpushbutton.h \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractbutton.h \ ui_widget.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QVariant \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QApplication \ @@ -2289,11 +2369,9 @@ debug\widget.obj: widget.cpp widget.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qbasictimer.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QEventLoop \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QElapsedTimer \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\QPixmap \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QDateTime \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qdatetime.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qcalendar.h \ - img_utils.h + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qcalendar.h debug\moc_widget.obj: debug\moc_widget.cpp diff --git a/Makefile.Release b/Makefile.Release index a021fce..33bc0a0 100644 --- a/Makefile.Release +++ b/Makefile.Release @@ -527,12 +527,14 @@ release\moc_widget.cpp: widget.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qhostaddress.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\QTcpServer \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qtcpserver.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QPushButton \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qpushbutton.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractbutton.h \ globals.h \ ..\..\Desktop\cotton_double\Include\MIL.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QMutex \ + img_utils.h \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\QPixmap \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QPushButton \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qpushbutton.h \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractbutton.h \ release\moc_predefs.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\bin\moc.exe C:\Qt\6.7.3\msvc2022_64\bin\moc.exe $(DEFINES) --compiler-flavor=msvc --include C:/Users/Administrator/Documents/cotton_double/release/moc_predefs.h -IC:/Qt/6.7.3/msvc2022_64/mkspecs/win32-msvc -IC:/Users/Administrator/Documents/cotton_double -IC:/Users/Administrator/Desktop/cotton_double/Include -ID:/opencv/opencv410-vs22/include -IC:/Qt/6.7.3/msvc2022_64/include -IC:/Qt/6.7.3/msvc2022_64/include/QtWidgets -IC:/Qt/6.7.3/msvc2022_64/include/QtGui -IC:/Qt/6.7.3/msvc2022_64/include/QtNetwork -IC:/Qt/6.7.3/msvc2022_64/include/QtCore -I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include" -I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\ATLMFC\include" -I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" -I"C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" -I"C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" -I"C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" widget.h -o release\moc_widget.cpp @@ -869,6 +871,9 @@ release\camera.obj: camera.cpp camera.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qdeadlinetimer.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qelapsedtimer.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qtsan_impl.h \ + img_utils.h \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\QPixmap \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qpixmap.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QTimer \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qtimer.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qbasictimer.h @@ -1008,7 +1013,120 @@ release\globals.obj: globals.cpp globals.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qobjectdefs_impl.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qfunctionaltools_impl.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qscopeguard.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qtsan_impl.h + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qtsan_impl.h \ + D:\opencv\opencv410-vs22\include\opencv2\opencv.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\opencv_modules.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\cvdef.h \ + D:\opencv\opencv410-vs22\include\opencv2\core\version.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\hal\interface.h \ + D:\opencv\opencv410-vs22\include\opencv2\core\cv_cpu_dispatch.h \ + D:\opencv\opencv410-vs22\include\opencv2\core\cv_cpu_helper.h \ + D:\opencv\opencv410-vs22\include\opencv2\core\hal\msa_macros.h \ + D:\opencv\opencv410-vs22\include\opencv2\core\fast_math.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\base.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\cvstd.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\cvstd_wrapper.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\neon_utils.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\vsx_utils.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\check.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\traits.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\matx.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\saturate.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\matx.inl.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\types.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\mat.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\bufferpool.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\mat.inl.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\persistence.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\operations.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\cvstd.inl.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\utility.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\utils\instrumentation.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\utils\tls.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\optim.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\ovx.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\calib3d.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\features2d.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\flann\miniflann.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\flann\defines.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\config.h \ + D:\opencv\opencv410-vs22\include\opencv2\core\affine.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\utils\logger.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\utils\logger.defines.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\utils\logtag.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\dnn.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\dnn\dnn.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\async.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\dnn\version.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\dnn\dict.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\dnn\layer.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\dnn\dnn.inl.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\dnn\utils\inference_engine.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\flann.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\flann\flann_base.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\flann\general.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\matrix.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\params.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\any.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\saving.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\nn_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\result_set.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\all_indices.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\kdtree_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\dynamic_bitset.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\dist.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\heap.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\allocator.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\random.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\kdtree_single_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\kmeans_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\logger.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\composite_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\linear_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\hierarchical_clustering_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\lsh_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\lsh_table.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\autotuned_index.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\ground_truth.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\index_testing.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\timer.h \ + D:\opencv\opencv410-vs22\include\opencv2\flann\sampling.h \ + D:\opencv\opencv410-vs22\include\opencv2\highgui.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\imgcodecs.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\videoio.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\imgproc.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\imgproc\segmentation.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\ml.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\ml\ml.inl.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect\aruco_detector.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect\aruco_dictionary.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect\aruco_board.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect\graphical_code_detector.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect\detection_based_tracker.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect\face.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect\charuco_detector.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\objdetect\barcode.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\photo.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\warpers.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\warpers.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\cuda.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\cuda_types.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\core\cuda.inl.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\warpers_inl.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\matchers.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\motion_estimators.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\util.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\util_inl.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\camera.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\exposure_compensate.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\seam_finders.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\stitching\detail\blenders.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\video.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\video\tracking.hpp \ + D:\opencv\opencv410-vs22\include\opencv2\video\background_segm.hpp release\img_utils.obj: img_utils.cpp img_utils.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\QPixmap \ @@ -1272,49 +1390,7 @@ release\img_utils.obj: img_utils.cpp img_utils.h \ ..\..\Desktop\cotton_double\Include\ClassicMIL\MILDyn\milreg.h \ ..\..\Desktop\cotton_double\Include\ClassicMIL\MILDyn\milstr.h \ ..\..\Desktop\cotton_double\Include\ClassicMIL\MILDyn\PFNC.h \ - ..\..\Desktop\cotton_double\Include\ClassicMIL\milfuncll.h \ - camera.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QObject \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qobject.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qcoreevent.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qmetatype.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qcompare.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qcomparehelpers.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qfloat16.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qmath.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qiterable.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qmetacontainer.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qcontainerinfo.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qtaggedpointer.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qscopeguard.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qobject_impl.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qbindingstorage.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QQueue \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qqueue.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QDebug \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qdebug.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qtextstream.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qcontiguouscache.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qsharedpointer.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qsharedpointer_impl.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qmap.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qshareddata_impl.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qset.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qhash.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qvarlengtharray.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QString \ - onnxrunner.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\QTcpSocket \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qtcpsocket.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qtnetworkglobal.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qtnetwork-config.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qtnetworkexports.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qabstractsocket.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qhostaddress.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qiodevice.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qvariant.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\QTcpServer \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qtcpserver.h + ..\..\Desktop\cotton_double\Include\ClassicMIL\milfuncll.h release\main.obj: main.cpp widget.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QWidget \ @@ -1672,12 +1748,14 @@ release\main.obj: main.cpp widget.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qhostaddress.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\QTcpServer \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qtcpserver.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QPushButton \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qpushbutton.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractbutton.h \ globals.h \ ..\..\Desktop\cotton_double\Include\MIL.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QMutex \ + img_utils.h \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\QPixmap \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QPushButton \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qpushbutton.h \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractbutton.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QApplication \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qapplication.h @@ -2259,12 +2337,14 @@ release\widget.obj: widget.cpp widget.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qhostaddress.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\QTcpServer \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork\qtcpserver.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QPushButton \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qpushbutton.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractbutton.h \ globals.h \ ..\..\Desktop\cotton_double\Include\MIL.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QMutex \ + img_utils.h \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\QPixmap \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QPushButton \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qpushbutton.h \ + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractbutton.h \ ui_widget.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QVariant \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QApplication \ @@ -2288,11 +2368,9 @@ release\widget.obj: widget.cpp widget.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qbasictimer.h \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QEventLoop \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QElapsedTimer \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\QPixmap \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QDateTime \ ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qdatetime.h \ - ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qcalendar.h \ - img_utils.h + ..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qcalendar.h release\moc_widget.obj: release\moc_widget.cpp diff --git a/camera.cpp b/camera.cpp index a96c06a..57271bf 100644 --- a/camera.cpp +++ b/camera.cpp @@ -3,7 +3,7 @@ #include // Debug Options -#define GlobalDebug 1 // 全局是否允许打印Debug信息(打印会拖慢处理时间) +#define GlobalDebug 0 // 全局是否允许打印Debug信息(打印会拖慢处理时间) #define DebugDetection 0 // 注意开启这个编译选项会导致图片存储, 处理时间会很慢 #define DebugDetectionTime 0 // 是否打印处理时间 #define DebugLowerMacCOM 0 // 是否打印和下位机通讯的相关信息 @@ -46,7 +46,7 @@ ONNXRunner runner; std::map params; -int dual_cam_offset_y = 89; // 双相机之间的上下偏移值 +int dual_cam_offset_y = 0; // 双相机之间的上下偏移值 int widthBlocks = 20; // 输出的喷阀通道数 int heightBlocks = 512; // 输出的Mask高度 int sizeThreshold = 20; // 转化为喷阀的每块要求像素个数 @@ -95,7 +95,7 @@ bool iniCamera() MbufAllocColor(MilSystem,3,BufSizeX0,BufSizeY0,8 + M_UNSIGNED,M_IMAGE + M_GRAB + M_PROC,&detection_result0); MbufAllocColor(MilSystem,3,BufSizeX1,BufSizeY1,8 + M_UNSIGNED,M_IMAGE + M_GRAB + M_PROC,&detection_result1); MbufAllocColor(MilSystem,3,BufSizeX0,BufSizeY0,8 + M_UNSIGNED,M_IMAGE + M_GRAB + M_PROC,&MilImage_Onnx0); - MbufAllocColor(MilSystem,3,BufSizeX1,BufSizeY1,8 + M_UNSIGNED,M_IMAGE + M_GRAB + M_PROC,&MilImage_Onnx1);; + MbufAllocColor(MilSystem,3,BufSizeX1,BufSizeY1,8 + M_UNSIGNED,M_IMAGE + M_GRAB + M_PROC,&MilImage_Onnx1); //给每一个bufferlist分配空间 @@ -193,48 +193,11 @@ MIL_INT ProcessingFunction0(MIL_INT HookType, MIL_ID HookId, void *HookDataPtr) } auto [mask_tmp, newTail] = generateMaskWithTail(detection_result0, tail_0, widthBlocks, heightBlocks, sizeThreshold, rowRange, skipLeftCols, skipRightCols); - tail_0 = newTail; mask_0 = mask_tmp; - bool isReady; - vector> merged_mask; - vector> mask_tail; - - { - QMutexLocker locker_self(&imgDetectionReadyMutex); - imgDetectionReady0 = true; - // QMutexLocker locker_other(&imgDetectionReady1Mutex); - isReady = imgDetectionReady0 & imgDetectionReady1; - if(isReady) - { - merged_mask = ImageUtils::mergeMasks(mask_0, mask_1, dual_cam_offset_y); - std::tie(merged_mask, mask_tail) = ImageUtils::extractROI(merged_mask, 0, 0, widthBlocks, heightBlocks); - } - } - // 没有两个都完成就不发送 - if(!isReady) - return 0; - - // 发送前的处理 - // 将每个结果左右扩展,扩展半径默认为1 - auto mask_expaned = expandMaskHorizontally(merged_mask, expansionRaidus); - // 将结果的左右补充上0,让物体大小符合要求 - PadColumns(mask_expaned,padLeft,padRight,0); - //将mask扩展到合适的大小 - std::vector> mask_Total = expandArray(mask_expaned,64); - // save masks -#if(GlobalDebug && DebugDetection) - VectorToImg(mask_1,"C:/Users/Pc/Desktop/img/mask" + std::to_string(FuncCount1) + ".bmp"); - VectorToImg(mask_1,"C:/Users/Pc/Desktop/img/mask_ignored" + std::to_string(FuncCount1) + ".bmp"); - VectorToImg(mask_Total,"C:/Users/Pc/Desktop/img/mask_expended" + std::to_string(FuncCount1) + ".bmp"); -#endif - // 发送到下位机 - bool result_Low = get_valve_data(mask_Total); - if(!result_Low) - { - qWarning()<<"下位机发送失败"; - } + detection_ready.release(); + MbufFree(detection_result0); return 0; } @@ -255,8 +218,8 @@ MIL_INT ProcessingFunction1(MIL_INT HookType, MIL_ID HookId, void *HookDataPtr) // Update the current Img MIl id { - QMutexLocker locker(&gDispPicMutex1); - gDispCurrentPicId1 = ModifiedBufferId1; + QMutexLocker locker(&gDispPicMutex1); + gDispCurrentPicId1 = ModifiedBufferId1; } if(SaveImg_Flag) @@ -313,25 +276,12 @@ MIL_INT ProcessingFunction1(MIL_INT HookType, MIL_ID HookId, void *HookDataPtr) tail_1 = newTail; mask_1 = mask_tmp; - bool isReady; + detection_ready.acquire(); vector> merged_mask; vector> mask_tail; - { - QMutexLocker locker_self(&imgDetectionReadyMutex); - imgDetectionReady1 = true; - // QMutexLocker locker_other(&imgDetectionReady0Mutex); - - isReady = imgDetectionReady0 & imgDetectionReady1; - if(isReady) - { - merged_mask = ImageUtils::mergeMasks(mask_0, mask_1, dual_cam_offset_y); - std::tie(merged_mask, mask_tail) = ImageUtils::extractROI(merged_mask, 0, 0, widthBlocks, heightBlocks); - } - } - // 没有两个都完成就不发送 - if(!isReady) - return 0; + merged_mask = ImageUtils::mergeMasks(mask_0, mask_1, dual_cam_offset_y); + std::tie(merged_mask, mask_tail) = ImageUtils::extractROI(merged_mask, 0, 0, widthBlocks, heightBlocks); // 发送前的处理 // 将每个结果左右扩展,扩展半径默认为1 @@ -345,7 +295,7 @@ MIL_INT ProcessingFunction1(MIL_INT HookType, MIL_ID HookId, void *HookDataPtr) VectorToImg(mask_1,"C:/Users/Pc/Desktop/img/mask" + std::to_string(FuncCount1) + ".bmp"); VectorToImg(mask_1,"C:/Users/Pc/Desktop/img/mask_ignored" + std::to_string(FuncCount1) + ".bmp"); VectorToImg(mask_Total,"C:/Users/Pc/Desktop/img/mask_expended" + std::to_string(FuncCount1) + ".bmp"); -#endif +#endif \ // 发送到下位机 bool result_Low = get_valve_data(mask_Total); if(!result_Low) @@ -353,11 +303,13 @@ MIL_INT ProcessingFunction1(MIL_INT HookType, MIL_ID HookId, void *HookDataPtr) qWarning()<<"下位机发送失败"; } + + #if(GlobalDebug && DebugDetectionTime) timer_detection_time.printElapsedTime("Time of Processing From Get into Ca" "..0llBack to Sent to Lower Mac"); #endif - + MbufFree(detection_result1); return 0; } @@ -383,8 +335,8 @@ bool DestoryCamera() MbufFree(MilImage_Color1); MbufFree(MilImage_Onnx0); MbufFree(MilImage_Onnx1); - MbufFree(detection_result0); - MbufFree(detection_result1); + // MbufFree(detection_result0); + // MbufFree(detection_result1); MdigFree(MilDigitizer0); MdigFree(MilDigitizer1); MsysFree(MilSystem); @@ -1004,6 +956,10 @@ bool DestoryLowMac() bool get_valve_data(std::vector> mask) { + if (mask[0].size() % 8 != 0) { + std::cerr << "Error: mask 的第 0 行的列数应该为 8 的倍数。" << std::endl; + return false; + } uint8_t* mask_buf = new uint8_t[4096 + 8]; // 创建缓冲区,大小为3072 + 8 mask_buf[0] = 0xAA; // 起始标志 mask_buf[1] = 0x10; // 高位数据长度 (352 字节 -> 0x0160) @@ -1015,18 +971,14 @@ bool get_valve_data(std::vector> mask) int idx = 5; // 从 mask_buf[5] 开始存储数据 for (int i = 0; i < 512; i++) // 遍历512行 { - uint8_t byte = 0; - int bit_count = 0; - for (int j = 0; j < 64; j++) // 遍历64列 - { - byte = (byte << 1) | (uint8_t)mask[i][j]; // 将每个二进制位加入到字节中 - bit_count++; - if (bit_count == 8 || j == 63) // 每8个二进制位打包成一个字节 + for (int j = 0; j < int(64 / 8); j++) // 遍历64列 + { + uint8_t byte = 0; + for (int bit_idx = 0; bit_idx < 8; bit_idx++) { - mask_buf[idx++] = byte; - byte = 0; // 重置byte,开始下一个字节 - bit_count = 0; + byte |= (mask[i][ j * 8 + bit_idx] & 0x01) << bit_idx; // 每个字节内,低字节优先 } + mask_buf[idx++] = byte; } } @@ -1066,11 +1018,10 @@ bool get_valve_data(std::vector> mask) delete[] mask_buf; // 释放内存 - return 1; + return true; } - void Start_camera() { MdigProcess(MilDigitizer0, MilGrabBufferList0, 20, M_START, M_DEFAULT,ProcessingFunction0, M_NULL); diff --git a/cotton_double2.pro.user b/cotton_double2.pro.user index bc9a7ca..32e0517 100644 --- a/cotton_double2.pro.user +++ b/cotton_double2.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/globals.cpp b/globals.cpp index be952c8..cd21a4f 100644 --- a/globals.cpp +++ b/globals.cpp @@ -14,7 +14,4 @@ QMutex gMaskMutex1; MIL_ID gMask1 = 0; // 双相机结果同步 -QMutex imgDetectionReadyMutex; -QMutex imgDetectionReady1Mutex; -bool imgDetectionReady0 = false; -bool imgDetectionReady1 = false; +QSemaphore detection_ready(0); diff --git a/globals.h b/globals.h index 928fe7c..a0700ab 100644 --- a/globals.h +++ b/globals.h @@ -5,6 +5,7 @@ #include #include #include +#include // 图片显示0 extern QMutex gDispPicMutex0; @@ -20,9 +21,6 @@ extern MIL_ID gMask0; extern QMutex gMaskMutex1; extern MIL_ID gMask1; -extern QMutex imgDetectionReadyMutex; -extern QMutex imgDetectionReady1Mutex; -extern bool imgDetectionReady0; -extern bool imgDetectionReady1; +extern QSemaphore detection_ready; #endif // GLOBALS_H diff --git a/ui_widget.h b/ui_widget.h index 8259d1e..6d8adb4 100644 --- a/ui_widget.h +++ b/ui_widget.h @@ -25,7 +25,7 @@ class Ui_Widget public: QTabWidget *tabWidget; QWidget *tab; - QPushButton *pushButton; + QPushButton *pushButtonStart; QPushButton *pushButton_2; QPushButton *btn_goto_sort; QPushButton *btn_0to3; @@ -35,7 +35,7 @@ public: QPushButton *btn_reconnect; QWidget *tab_2; QLabel *lab_info; - QPushButton *btn_start; + QPushButton *pushButton; QPushButton *btn_stop; QLabel *camera_0_img; QLabel *camera_1_img; @@ -73,9 +73,9 @@ public: tabWidget->setGeometry(QRect(0, 0, 801, 601)); tab = new QWidget(); tab->setObjectName("tab"); - pushButton = new QPushButton(tab); - pushButton->setObjectName("pushButton"); - pushButton->setGeometry(QRect(100, 130, 201, 61)); + pushButtonStart = new QPushButton(tab); + pushButtonStart->setObjectName("pushButtonStart"); + pushButtonStart->setGeometry(QRect(100, 130, 201, 61)); pushButton_2 = new QPushButton(tab); pushButton_2->setObjectName("pushButton_2"); pushButton_2->setGeometry(QRect(400, 120, 181, 71)); @@ -124,9 +124,9 @@ public: QFont font; font.setPointSize(28); lab_info->setFont(font); - btn_start = new QPushButton(tab_2); - btn_start->setObjectName("btn_start"); - btn_start->setGeometry(QRect(20, 130, 101, 41)); + pushButton = new QPushButton(tab_2); + pushButton->setObjectName("pushButton"); + pushButton->setGeometry(QRect(20, 130, 101, 41)); btn_stop = new QPushButton(tab_2); btn_stop->setObjectName("btn_stop"); btn_stop->setGeometry(QRect(20, 190, 101, 41)); @@ -226,7 +226,7 @@ public: void retranslateUi(QWidget *Widget) { Widget->setWindowTitle(QCoreApplication::translate("Widget", "Widget", nullptr)); - pushButton->setText(QCoreApplication::translate("Widget", "\345\274\200\345\247\213", nullptr)); + pushButtonStart->setText(QCoreApplication::translate("Widget", "\345\274\200\345\247\213", nullptr)); pushButton_2->setText(QCoreApplication::translate("Widget", "\344\277\235\345\255\230\345\233\276\347\211\207", nullptr)); btn_goto_sort->setText(QCoreApplication::translate("Widget", "\345\201\234\346\255\242", nullptr)); btn_0to3->setText(QCoreApplication::translate("Widget", "\345\226\267\351\230\200\346\265\213\350\257\225", nullptr)); @@ -236,7 +236,7 @@ public: btn_reconnect->setText(QCoreApplication::translate("Widget", "\351\207\215\346\226\260\350\277\236\346\216\245", nullptr)); tabWidget->setTabText(tabWidget->indexOf(tab), QCoreApplication::translate("Widget", "Tab 1", nullptr)); lab_info->setText(QCoreApplication::translate("Widget", "\345\207\206\345\244\207\344\270\255", nullptr)); - btn_start->setText(QCoreApplication::translate("Widget", "\345\274\200\345\247\213\345\210\206\351\200\211", nullptr)); + pushButton->setText(QCoreApplication::translate("Widget", "\345\274\200\345\247\213\345\210\206\351\200\211", nullptr)); btn_stop->setText(QCoreApplication::translate("Widget", "\345\201\234\346\255\242\345\210\206\351\200\211", nullptr)); camera_0_img->setText(QString()); camera_1_img->setText(QString()); diff --git a/widget.cpp b/widget.cpp index 3bd9504..d89ab0e 100644 --- a/widget.cpp +++ b/widget.cpp @@ -47,8 +47,8 @@ Widget::~Widget() void Widget::refreshImage() { - refreshSingleImage(0); - refreshSingleImage(1); + refreshSingleImage(0, false); + refreshSingleImage(1, false); } void Widget::refreshSingleImage(int camera_id, bool overlay_result) @@ -147,3 +147,21 @@ void Widget::on_btn_goto_sort_clicked() DestoryLowMac(); } + +void Widget::on_btn_stop_clicked() +{ + // 回复显示的图片 + { + QMutexLocker locker(&gDispPicMutex0); + gDispCurrentPicId0 = 0; + } + ui->camera_0_img->clear(); + { + QMutexLocker locker(&gDispPicMutex1); + gDispCurrentPicId1 = 0; + } + ui->camera_1_img->clear(); + DestoryCamera(); + DestoryLowMac(); +} + diff --git a/widget.h b/widget.h index 5023732..823d9ab 100644 --- a/widget.h +++ b/widget.h @@ -34,6 +34,8 @@ private slots: void on_btn_goto_sort_clicked(); + void on_btn_stop_clicked(); + private: Ui::Widget *ui; diff --git a/widget.ui b/widget.ui index 16d1d69..70e0e6b 100644 --- a/widget.ui +++ b/widget.ui @@ -29,7 +29,7 @@ Tab 1 - + 100 @@ -274,7 +274,7 @@ 准备中 - + 20