拿破仑凯旋版
This commit is contained in:
parent
c967a2daec
commit
f52498030c
@ -19,7 +19,7 @@ CXXFLAGS = -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStri
|
||||
INCPATH = -I. -IInclude -Iopencv410-vs22\include -I..\..\..\..\Qt\6.7.3\msvc2022_64\include -I..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets -I..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui -I..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork -I..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore -Idebug -I. -I/include -I..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\win32-msvc
|
||||
LINKER = link
|
||||
LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'"
|
||||
LIBS = /LIBPATH:C:\Users\Administrator\Documents\cotton_double\LIB C:\Users\Administrator\Documents\cotton_double\LIB\mil.lib C:\Users\Administrator\Documents\cotton_double\LIB\Milim.lib C:\Users\Administrator\Documents\cotton_double\opencv410-vs22\x64\vc17\lib\*.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6Widgetsd.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6Guid.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6Networkd.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6Cored.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6EntryPointd.lib shell32.lib
|
||||
LIBS = /LIBPATH:C:\Users\Administrator\Documents\cotton_double\LIB C:\Users\Administrator\Documents\cotton_double\LIB\mil.lib C:\Users\Administrator\Documents\cotton_double\LIB\Milim.lib C:\Users\Administrator\Documents\cotton_double\LIB\milblob.lib C:\Users\Administrator\Documents\cotton_double\opencv410-vs22\x64\vc17\lib\*.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6Widgetsd.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6Guid.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6Networkd.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6Cored.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6EntryPointd.lib shell32.lib
|
||||
QMAKE = C:\Qt\6.7.3\msvc2022_64\bin\qmake.exe
|
||||
DEL_FILE = del
|
||||
CHK_DIR_EXISTS= if not exist
|
||||
@ -3401,28 +3401,52 @@ debug\widget.obj: widget.cpp widget.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qapplication.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QCheckBox \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qcheckbox.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QFrame \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QComboBox \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qcombobox.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractitemdelegate.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qstyleoption.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractspinbox.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qvalidator.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qregularexpression.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qslider.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractslider.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qstyle.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qtabbar.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qtabwidget.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qrubberband.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qframe.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QGridLayout \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qgridlayout.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qlayout.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qlayoutitem.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qboxlayout.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qabstractitemmodel.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QFrame \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QGroupBox \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qgroupbox.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QHBoxLayout \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qboxlayout.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qlayout.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qlayoutitem.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qgridlayout.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QLabel \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qlabel.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qpicture.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qtextdocument.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QLineEdit \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qlineedit.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qtextcursor.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qtextformat.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qpen.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qtextoption.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QListView \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qlistview.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractitemview.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractscrollarea.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qitemselectionmodel.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QListWidget \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qlistwidget.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QProgressBar \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qprogressbar.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QSpacerItem \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QSpinBox \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qspinbox.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractspinbox.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qvalidator.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qregularexpression.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QTabWidget \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qtabwidget.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QVBoxLayout \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QTimer \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qtimer.h \
|
||||
@ -3430,6 +3454,7 @@ debug\widget.obj: widget.cpp widget.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\QtCore\QDateTime \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QTabBar \
|
||||
detectionworker.h
|
||||
|
||||
debug\moc_storageworker.obj: debug\moc_storageworker.cpp
|
||||
|
||||
@ -19,7 +19,7 @@ CXXFLAGS = -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStri
|
||||
INCPATH = -I. -IInclude -Iopencv410-vs22\include -I..\..\..\..\Qt\6.7.3\msvc2022_64\include -I..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets -I..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui -I..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtNetwork -I..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore -Irelease -I. -I/include -I..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\win32-msvc
|
||||
LINKER = link
|
||||
LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT /OPT:REF /OPT:ICF /INCREMENTAL:NO /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'"
|
||||
LIBS = /LIBPATH:C:\Users\Administrator\Documents\cotton_double\LIB C:\Users\Administrator\Documents\cotton_double\LIB\mil.lib C:\Users\Administrator\Documents\cotton_double\LIB\Milim.lib C:\Users\Administrator\Documents\cotton_double\opencv410-vs22\x64\vc17\lib\*.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6Widgets.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6Gui.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6Network.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6Core.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6EntryPoint.lib shell32.lib
|
||||
LIBS = /LIBPATH:C:\Users\Administrator\Documents\cotton_double\LIB C:\Users\Administrator\Documents\cotton_double\LIB\mil.lib C:\Users\Administrator\Documents\cotton_double\LIB\Milim.lib C:\Users\Administrator\Documents\cotton_double\LIB\milblob.lib C:\Users\Administrator\Documents\cotton_double\opencv410-vs22\x64\vc17\lib\*.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6Widgets.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6Gui.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6Network.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6Core.lib C:\Qt\6.7.3\msvc2022_64\lib\Qt6EntryPoint.lib shell32.lib
|
||||
QMAKE = C:\Qt\6.7.3\msvc2022_64\bin\qmake.exe
|
||||
DEL_FILE = del
|
||||
CHK_DIR_EXISTS= if not exist
|
||||
@ -3400,28 +3400,52 @@ release\widget.obj: widget.cpp widget.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qapplication.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QCheckBox \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qcheckbox.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QFrame \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QComboBox \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qcombobox.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractitemdelegate.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qstyleoption.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractspinbox.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qvalidator.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qregularexpression.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qslider.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractslider.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qstyle.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qtabbar.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qtabwidget.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qrubberband.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qframe.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QGridLayout \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qgridlayout.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qlayout.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qlayoutitem.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qboxlayout.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qabstractitemmodel.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QFrame \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QGroupBox \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qgroupbox.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QHBoxLayout \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qboxlayout.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qlayout.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qlayoutitem.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qgridlayout.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QLabel \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qlabel.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qpicture.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qtextdocument.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QLineEdit \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qlineedit.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qtextcursor.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qtextformat.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qpen.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qtextoption.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QListView \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qlistview.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractitemview.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractscrollarea.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qitemselectionmodel.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QListWidget \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qlistwidget.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QProgressBar \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qprogressbar.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QSpacerItem \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QSpinBox \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qspinbox.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qabstractspinbox.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtGui\qvalidator.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qregularexpression.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QTabWidget \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\qtabwidget.h \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QVBoxLayout \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\QTimer \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtCore\qtimer.h \
|
||||
@ -3429,6 +3453,7 @@ release\widget.obj: widget.cpp widget.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\QtCore\QDateTime \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\include\QtWidgets\QTabBar \
|
||||
detectionworker.h
|
||||
|
||||
release\moc_storageworker.obj: release\moc_storageworker.cpp
|
||||
|
||||
26
camera.cpp
26
camera.cpp
@ -45,7 +45,7 @@ std::map<std::string, int> params;
|
||||
int dual_cam_offset_y = 0; // 双相机之间的上下偏移值
|
||||
int widthBlocks = 20; // 输出的喷阀通道数
|
||||
int heightBlocks = 512; // 输出的Mask高度
|
||||
int sizeThreshold = 20; // 转化为喷阀的每块要求像素个数
|
||||
int sizeThreshold = 6; // 转化为喷阀的每块要求像素个数
|
||||
int expansionRaidus = 1; // 获取mask后进行左右位置的扩展
|
||||
int padLeft = 1; // 左侧在结果Mask上补0
|
||||
int padRight = 1; // 右侧在结果Mask上补0
|
||||
@ -658,7 +658,7 @@ void lab_process_raw(const MIL_ID& inputImage, MIL_ID& outputImageLab, const std
|
||||
MbufAlloc2d(MilSystem, SizeX, SizeY, 8 + M_UNSIGNED, M_IMAGE + M_PROC, &MilResultLab);
|
||||
MbufAlloc2d(MilSystem, SizeX, SizeY, 8 + M_UNSIGNED, M_IMAGE + M_PROC, &lab_result);
|
||||
|
||||
|
||||
MbufClear(lab_result, M_COLOR_BLACK);
|
||||
// Iterate over colors
|
||||
// 遍历颜色
|
||||
for (const auto& color : color_vector) {
|
||||
@ -699,10 +699,12 @@ void lab_process_raw(const MIL_ID& inputImage, MIL_ID& outputImageLab, const std
|
||||
MimArith(MilBinaryL, MilBinaryA, MilResultLab, M_AND);
|
||||
MimArith(MilResultLab, MilBinaryB, MilResultLab, M_AND);
|
||||
|
||||
|
||||
// 与输出图像合并
|
||||
MimArith(lab_result, MilResultLab, lab_result, M_OR);
|
||||
|
||||
}
|
||||
|
||||
MimClose(lab_result, MilResultLab, denoising, M_BINARY);
|
||||
MimOpen(MilResultLab, outputImageLab, denoising, M_BINARY);
|
||||
|
||||
@ -826,6 +828,26 @@ void high_sat_detect(const MIL_ID& inputImage, MIL_ID& outputImage, const std::m
|
||||
|
||||
// 合并 Lab 和 HSV 的结果(取“或”运算)
|
||||
MimArith(output_hsv, output_lab, outputImage, M_OR);
|
||||
// MIL_ID MilBlobContext = M_NULL, MilBlobResult = M_NULL, MilFiltered = M_NULL;
|
||||
// MIL_INT SizeX = 0, SizeY = 0;
|
||||
// MIL_INT blob_count = 0;
|
||||
// MblobAlloc(MilSystem, M_DEFAULT, M_DEFAULT, &MilBlobContext);
|
||||
// MblobAllocResult(MilSystem, M_DEFAULT, M_DEFAULT, &MilBlobResult);
|
||||
// MblobCalculate(MilBlobContext, outputImage, M_NULL, MilBlobResult);
|
||||
// MblobSelect(MilBlobResult, M_EXCLUDE, M_AREA, M_LESS, MIN_AREA, M_NULL);
|
||||
// MblobGetResult(MilBlobResult, M_NUMBER, &blob_count); // 修正:只传 M_NUMBER
|
||||
// // 获取 detection_result 的尺寸
|
||||
// MbufInquire(outputImage, M_SIZE_X, &SizeX);
|
||||
// MbufInquire(outputImage, M_SIZE_Y, &SizeY);
|
||||
// // 分配一个新的二值图像来存储筛选后的结果
|
||||
// MbufAlloc2d(MilSystem, SizeX, SizeY, 8 + M_UNSIGNED, M_IMAGE + M_PROC, &MilFiltered);
|
||||
// // 将 MilFiltered 初始化为 0(全黑)
|
||||
// MbufClear(MilFiltered, 0);
|
||||
// MIL_ID MilGraphicsContext;
|
||||
// MgraAlloc(MilSystem, &MilGraphicsContext);
|
||||
// MblobDraw(MilGraphicsContext, MilBlobResult, MilFiltered, M_DRAW_BLOBS, M_INCLUDED_BLOBS, M_DEFAULT);
|
||||
// // 将筛选后的结果复制回 detection_result
|
||||
// MbufCopy(MilFiltered, outputImage);
|
||||
MbufFree(output_lab);
|
||||
MbufFree(output_hsv);
|
||||
}
|
||||
|
||||
2
camera.h
2
camera.h
@ -93,6 +93,8 @@ void lab_process_raw(const MIL_ID& inputImage, MIL_ID& outputImageLab, const std
|
||||
|
||||
void high_sat_detect(const MIL_ID& inputImage, MIL_ID& outputImage, const std::map<std::string, int>& params);
|
||||
|
||||
#define MIN_AREA 30
|
||||
|
||||
extern std::map<std::string, int> params;
|
||||
|
||||
void read_params_from_file(const std::string& filename, std::map<std::string, int>& params) ;
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
# Green color parameters
|
||||
green_L_min = 20
|
||||
green_L_max = 55
|
||||
green_a_min = -32
|
||||
green_L_min = 16
|
||||
green_L_max = 56
|
||||
green_a_min = -33
|
||||
green_a_max = -11
|
||||
green_b_min = -7
|
||||
green_b_max = 20
|
||||
green_b_max = 24
|
||||
|
||||
# Blue color parameters
|
||||
blue_L_min = 20
|
||||
@ -12,41 +12,41 @@ blue_L_max = 43
|
||||
blue_a_min = -13
|
||||
blue_a_max = 22
|
||||
blue_b_min = -48
|
||||
blue_b_max = -3
|
||||
blue_b_max = -8
|
||||
|
||||
# Orange color parameters
|
||||
orange_L_min = 62
|
||||
orange_L_max = 77
|
||||
orange_a_min = 7
|
||||
orange_a_max = 15
|
||||
orange_b_min = 30
|
||||
orange_b_max = 48
|
||||
orange_L_min = 60
|
||||
orange_L_max = 60
|
||||
orange_a_min = 6
|
||||
orange_a_max = 6
|
||||
orange_b_min = 20
|
||||
orange_b_max = 46
|
||||
|
||||
# Black color parameters
|
||||
black_L_min = 1
|
||||
black_L_max = 11
|
||||
black_a_min = -5
|
||||
black_L_min = 0
|
||||
black_L_max = 8
|
||||
black_a_min = -4
|
||||
black_a_max = 2
|
||||
black_b_min = -3
|
||||
black_b_max = 6
|
||||
black_b_max = 4
|
||||
|
||||
# Red color parameters
|
||||
red_L_min = 20
|
||||
red_L_max = 44
|
||||
red_a_min = 10
|
||||
red_a_max = 30
|
||||
red_b_min = -99
|
||||
red_b_max = 32
|
||||
red_L_min = 23
|
||||
red_L_max = 48
|
||||
red_a_min = 12
|
||||
red_a_max = 55
|
||||
red_b_min = -80
|
||||
red_b_max = 37
|
||||
|
||||
# Purple color parameters
|
||||
purple_L_min = 38
|
||||
purple_L_max = 75
|
||||
purple_a_min = 12
|
||||
purple_a_max = 22
|
||||
purple_b_min = -48
|
||||
purple_L_max = 54
|
||||
purple_a_min = 10
|
||||
purple_a_max = 20
|
||||
purple_b_min = -45
|
||||
purple_b_max = 1
|
||||
|
||||
# Other parameters
|
||||
lab_denoising = 1
|
||||
saturation_threshold = 155
|
||||
saturation_threshold = 165
|
||||
saturation_denoising = 1
|
||||
|
||||
@ -39,6 +39,8 @@ INCLUDEPATH += $${PWD}/Include
|
||||
DEPENDPATH += $${PWD}/Include
|
||||
LIBS += -L$${PWD}/LIB -lmil
|
||||
LIBS += -L$${PWD}/LIB -lMilim
|
||||
LIBS += -L$${PWD}/LIB -lmilblob
|
||||
|
||||
|
||||
|
||||
LIBS += \
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 15.0.0, 2024-12-28T13:38:02. -->
|
||||
<!-- Written by QtCreator 15.0.0, 2024-12-29T01:01:20. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
# Green color parameters
|
||||
green_L_min = 20
|
||||
green_L_max = 55
|
||||
green_a_min = -32
|
||||
green_L_min = 16
|
||||
green_L_max = 56
|
||||
green_a_min = -33
|
||||
green_a_max = -11
|
||||
green_b_min = -7
|
||||
green_b_max = 20
|
||||
green_b_max = 24
|
||||
|
||||
# Blue color parameters
|
||||
blue_L_min = 20
|
||||
@ -12,41 +12,41 @@ blue_L_max = 43
|
||||
blue_a_min = -13
|
||||
blue_a_max = 22
|
||||
blue_b_min = -48
|
||||
blue_b_max = -3
|
||||
blue_b_max = -8
|
||||
|
||||
# Orange color parameters
|
||||
orange_L_min = 62
|
||||
orange_L_max = 77
|
||||
orange_a_min = 7
|
||||
orange_a_max = 15
|
||||
orange_b_min = 30
|
||||
orange_b_max = 48
|
||||
orange_L_min = 60
|
||||
orange_L_max = 60
|
||||
orange_a_min = 6
|
||||
orange_a_max = 6
|
||||
orange_b_min = 20
|
||||
orange_b_max = 46
|
||||
|
||||
# Black color parameters
|
||||
black_L_min = 1
|
||||
black_L_max = 11
|
||||
black_a_min = -5
|
||||
black_L_min = 0
|
||||
black_L_max = 8
|
||||
black_a_min = -4
|
||||
black_a_max = 2
|
||||
black_b_min = -3
|
||||
black_b_max = 6
|
||||
black_b_max = 4
|
||||
|
||||
# Red color parameters
|
||||
red_L_min = 20
|
||||
red_L_max = 44
|
||||
red_a_min = 10
|
||||
red_a_max = 30
|
||||
red_b_min = -99
|
||||
red_b_max = 32
|
||||
red_L_min = 23
|
||||
red_L_max = 48
|
||||
red_a_min = 12
|
||||
red_a_max = 55
|
||||
red_b_min = -80
|
||||
red_b_max = 37
|
||||
|
||||
# Purple color parameters
|
||||
purple_L_min = 38
|
||||
purple_L_max = 75
|
||||
purple_a_min = 12
|
||||
purple_a_max = 22
|
||||
purple_b_min = -48
|
||||
purple_L_max = 54
|
||||
purple_a_min = 10
|
||||
purple_a_max = 20
|
||||
purple_b_min = -45
|
||||
purple_b_max = 1
|
||||
|
||||
# Other parameters
|
||||
lab_denoising = 1
|
||||
saturation_threshold = 155
|
||||
saturation_threshold = 165
|
||||
saturation_denoising = 1
|
||||
|
||||
@ -20,16 +20,16 @@ using namespace std;
|
||||
|
||||
|
||||
// 硬编码参数值
|
||||
int file_delay = 1200; // 延迟时间(毫秒)
|
||||
int file_delay = 1180; // 延迟时间(毫秒)
|
||||
int file_encoder = 12000; // 行频
|
||||
int file_valve = 200; // 喷阀触发频率
|
||||
|
||||
//下位机参数
|
||||
int lowmac_dp = 350; //偏振延迟时间
|
||||
int lowmac_sm = 1200; //吹气量 valve/12 = 吹气时间ms
|
||||
int lowmac_ts = 8; //模板匹配阈值
|
||||
int lowmac_sg = 60; //偏振绿色通道大小阈值
|
||||
int lowmac_td = 7; //偏振红色通道差值
|
||||
int lowmac_ts = 10; //模板匹配阈值
|
||||
int lowmac_sg = 75; //偏振绿色通道大小阈值
|
||||
int lowmac_td = 8; //偏振红色通道差值
|
||||
Widget::Widget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::Widget)
|
||||
@ -105,6 +105,7 @@ void Widget::refreshImage()
|
||||
this->ui->dl_enable_1->setEnabled(!this->isCamRunning);
|
||||
this->ui->tra_enable_0->setEnabled(!this->isCamRunning);
|
||||
this->ui->tra_enable_1->setEnabled(!this->isCamRunning);
|
||||
this->ui->btn_quit->setEnabled(!this->isCamRunning);
|
||||
//
|
||||
QDateTime now = QDateTime::currentDateTime();
|
||||
ui->label_currentDateTime->setText(now.toString("yyyy-MM-dd hh:mm:ss"));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user