zbaR cmakelists
时间: 2023-09-30 09:11:06 浏览: 188
zBar库 VS2013
5星 · 资源好评率100%
在CMakeLists.txt文件中,通过target_link_libraries命令将zbar库链接到项目中。具体的代码如下所示:target_link_libraries(${PROJECT_NAME} ${ZBAR_LIBS} zbar)。
在另一个CMakeLists.txt文件中,estimate_marker_pose库通过target_link_libraries命令链接了OpenCV库。与此同时,main可执行文件也通过target_link_libraries命令链接了zbar、estimate_marker_pose和OpenCV库。具体的代码如下所示:
```
# estimate_marker_pose
add_library(estimate_marker_pose src/estimate_marker_pose.cpp)
target_link_libraries(estimate_marker_pose ${OpenCV_LIBS})
# main
add_executable(main src/main.cpp)
target_link_libraries(main zbar estimate_marker_pose ${OpenCV_LIBS})
```
在estimate_marker_pose.h头文件中,引用了一些OpenCV相关的头文件,包括core、imgproc、highgui和opencv。其中定义了一些函数,如myDrawFrameAxes、myDrawDetectedMarkers、myGetSingleMarkerObjectPoints和myEstimatePoseSingleMarkers。这些函数用于绘制坐标轴、绘制边框和id、生成实际定点的坐标以及解算PnP获取旋转向量和平移向量等操作。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Cmakelists配置zbar](https://blog.csdn.net/Mmagic1/article/details/81708449)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [参考 opencv aruco 实现对二维码(QR码)的检测与定位](https://blog.csdn.net/liam_dapaitou/article/details/104551420)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文