当前位置:网站首页>33、使用RGBD相机进行目标检测和深度信息输出
33、使用RGBD相机进行目标检测和深度信息输出
2022-06-26 12:41:00 【sxj731533730】
基本思想:手中有一块运适科技的RGBD深度相机,做了一下简单测试和记录,在权衡D415相机、OAK相机、RGBD(运适)相机之后,最后还是选择RGBD相机,部署工业需求。
一、我这里使用的官方提供的example进行测试,IDE使用Clion开发工具,环境是ubuntu20.04的开发环境. 这里做了一些简单设置,首先执行例子中的berxel-usb.rules规则,将其usb规则添加到系统中。然后将libs包中的除libBerxelHawk.so 都复制到/usr/lib/中.
cmakelists.txt文件内容
cmake_minimum_required(VERSION 3.16)
project(untitled)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
include_directories(${CMAKE_SOURCE_DIR}/include)
add_library(libBerxelHawk SHARED IMPORTED)
set_target_properties(libBerxelHawk PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/lib/libBerxelHawk.so)
add_executable(untitled main.cpp BerxelCommonFunc.cpp BerxelImageRender.cpp )
target_link_libraries(untitled libBerxelHawk -lglut -lGL)
代码我就不贴了,只放上clion的目录结构
测试结果,工程使用的HawkMixColorDepthMatting 下图为鼠标点击操作结果
二、使用检测目标和深度信息进行结合,这里使用NCNN nanodet+官方代码进行结合
cmakelist.txt文件内容
cmake_minimum_required(VERSION 3.16)
project(untitled4)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
include_directories(${CMAKE_SOURCE_DIR}/include)
include_directories(${CMAKE_SOURCE_DIR}/include/ncnn)
add_library(libBerxelHawk SHARED IMPORTED)
set_target_properties(libBerxelHawk PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/lib/libBerxelHawk.so)
add_library(libncnn STATIC IMPORTED)
set_target_properties(libncnn PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/lib/libncnn.a)
find_package(OpenCV REQUIRED)
add_executable(untitled4 main.cpp BerxelCommonFunc.cpp BerxelImageRender.cpp DetectObject.cpp include/DetectObject.h)
target_link_libraries(
untitled4
libBerxelHawk
-lglut
-lGL
${OpenCV_LIBS}
libncnn
)
这里因为使用检测目标的左上角坐标,因该使用被检测目标的中心点坐标,且只做单目标检测
修改的代码上传github: https://github.com/sxj731533730/RGBD.git
边栏推荐
- MariaDB study notes
- Echart stack histogram: add white spacing effect setting between color blocks
- Arcpy - - utilisation de la fonction insertlayer (): ajout de calques dans un document de carte
- 7-2 a Fu the thief
- Electron official docs series: References
- Here document interaction free and expect automatic interaction
- ES基于Snapshot(快照)的数据备份和还原
- Mysql database explanation (III)
- Oplg: new generation cloud native observable best practices
- awk工具
猜你喜欢
mysql讲解(一)
Bridge mode
Lamp compilation and installation
awk工具
Hdu1724[Simpson formula for integral]ellipse
There are many contents in the widget, so it is a good scheme to support scrolling
MongoDB系列之Window环境部署配置
三维向量的夹角
2. Introduction to parallel interface, protocol and related chips (8080, 8060)
MySQL数据库讲解(三)
随机推荐
I - Dollar Dayz
Vivado error code [drc pdcn-2721] resolution
Analysis of state transition diagram of Beifu NC axis
防火墙介绍
Common faults of MySQL database - forgetting database password
Solutions to insufficient display permissions of find and Du -sh
G - Cow Bowling
tauri vs electron
Coprime and non coprime of template problems of Chinese remainder theorem
C - Common Subsequence
Oplg: new generation cloud native observable best practices
泰山OFFICE技术讲座:使用字体粗体的四种情形
To solve the difficulties of small and medium-sized enterprises, Baidu AI Cloud makes an example
Beifu PLC realizes data power-off maintenance based on cx5130
网络远程访问的方式使用树莓派
Aesthetic experience (episode 238) Luo Guozheng
Processing function translate (mousex, mousey) learning
7-2 a Fu the thief
Arcpy -- use of insertlayer() function: adding layers to map documents
B - Bridging signals