Skip to content

Commit 4705ccf

Browse files
committed
by async shopping motion
1 parent 899dfe8 commit 4705ccf

File tree

6 files changed

+615
-8
lines changed

6 files changed

+615
-8
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
cmake_minimum_required(VERSION 3.10)
2+
project(ColorDetection)
3+
4+
set(CMAKE_CXX_STANDARD 17)
5+
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
6+
7+
# 寻找OpenCV库
8+
find_package(OpenCV REQUIRED)
9+
include_directories(${OpenCV_INCLUDE_DIRS})
10+
11+
# 寻找libcamera库
12+
find_package(PkgConfig REQUIRED)
13+
pkg_check_modules(LIBCAMERA REQUIRED libcamera)
14+
include_directories(${LIBCAMERA_INCLUDE_DIRS})
15+
link_directories(${LIBCAMERA_LIBRARY_DIRS})
16+
17+
# 寻找pigpio库
18+
find_library(PIGPIO_LIBRARY NAMES pigpio REQUIRED)
19+
20+
# 指定项目的源文件
21+
set(SOURCE_FILES
22+
HSC_colordet.cpp
23+
ColorDetectionCallback.cpp
24+
libcam2opencv.cpp
25+
arm_opencv_cb.cpp
26+
arm_sys.cpp
27+
)
28+
29+
# 添加可执行文件
30+
add_executable(ColorDetection ${SOURCE_FILES})
31+
32+
# 链接库到可执行文件
33+
target_link_libraries(ColorDetection ${OpenCV_LIBS} ${LIBCAMERA_LIBRARIES} ${PIGPIO_LIBRARY})

Basic_Development/Arm_Vision_Sys/Color_Detect/HSC_colordet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Author: Geo date: 15 Apr 2024 time:12:37
33
Version: 1.0
44
it is using for color detection, because we need to know the color HSV value of the object.
55
*/
6-
#include "libcam2opencv.h"
7-
#include "ColorDetectionCallback.h"
6+
#include "libcam2opencv.cpp"
7+
#include "ColorDetectionCallback.cpp"
88

99
int main() {
1010
try {

0 commit comments

Comments
 (0)