diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a0a07f..400696a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,11 +53,11 @@ add_executable(cotton_color2 cotton_color2.cpp) # 链接 OpenCV 和 Qt 库 target_link_libraries(cotton_color2 Qt6::Widgets ${OpenCV_LIBS} ${MIL_LIBS}) -add_executable(color_matching Matrox/template_matching.cpp - Matrox/onnx_running.cpp) +add_executable(color_matching Matrox/template_matching.cpp) target_link_libraries(color_matching Qt6::Widgets ${OpenCV_LIBS} ${MIL_LIBS}) + add_executable(ui Matrox/ui.cpp) target_link_libraries(ui Qt6::Widgets) diff --git a/Matrox/onnx_running.cpp b/Matrox/onnx_running.cpp index 8748c4a..10de9a0 100644 --- a/Matrox/onnx_running.cpp +++ b/Matrox/onnx_running.cpp @@ -53,7 +53,7 @@ int MosMain(void) MclassAllocResult(MilSystem, M_PREDICT_ONNX_RESULT, M_DEFAULT, &DetectRes); // Perform object detection on the image using MclassPredict. - MclassPredict(DetectCtx, MilImage, DetectRes, M_DEFAULT); + MclassPredict(DetectCtx, MilImage, DetectRes, M_DEFAULT);////执行到这一步报错 MosPrintf(MIL_TEXT("Object detection completed.\n")); // Allocate a buffer for displaying the detection results. diff --git a/doc/MatroxQ&A.assets/image-20241113112631605.png b/doc/MatroxQ&A.assets/image-20241113112631605.png new file mode 100644 index 0000000..7e79fec Binary files /dev/null and b/doc/MatroxQ&A.assets/image-20241113112631605.png differ