代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 3.10)
project(project)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_BUILD_TYPE Debug)
set(thirdParty ${CMAKE_SOURCE_DIR}/3rdparty)
# set lib
set(LIBS pthread)
#########################3rdParty library#############################
# daheng image api include
include_directories(${CMAKE_SOURCE_DIR}/inc)
link_directories(/usr/lib)
list(APPEND LIBS gxiapi)
# opencv library
include_directories(${thirdParty}/opencv/include)
link_directories(${thirdParty}/opencv/lib)
list(APPEND LIBS opencv_core opencv_highgui opencv_imgcodecs opencv_imgproc opencv_video opencv_imgproc opencv_features2d opencv_calib3d opencv_xfeatures2d opencv_flann opencv_videoio)
# Eigen library
include_directories(/usr/include/eigen3)
# halcon library
include_directories(/opt/halcon/include)
link_directories(/opt/halcon/lib/x64-linux)
list(APPEND LIBS halcon halconcpp hdevenginecpp)
#####################################################################
# set cpp files set
file(GLOB CPPS ${CMAKE_SOURCE_DIR}/src/*.cpp)
# micros
add_definitions(-DUSE_THREE_CAMERA) # 使用三个相机
add_definitions(-DUSE_FOUR_CAMERA) # 使用四个相机
# 下面的2个开关只能打开其中一个
option(OpencvCalibration "apply opencv for calibration" OFF)
option(HalconCalibration "apply halcon for calibration" ON)
if (OpencvCalibration)
add_definitions(-DOpencvCalibration)
elseif(HalconCalibration)
add_definitions(-DHalconCalibration)
endif()
# sample scripts
add_subdirectory(samples)
# main program
add_executable(main main.cpp ${CPPS})
target_link_libraries(main ${LIBS})
# 收集相机标定数据
add_executable(getCameraCalibrationData getCameraCalibrationData.cpp ${CPPS} src/imageProcess.cpp inc/imageProcess.h src/Global.cpp inc/ThreadSafeQueue.h)
target_link_libraries(getCameraCalibrationData ${LIBS})
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。