当前位置:网站首页>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
边栏推荐
- Aesthetic experience (episode 238) Luo Guozheng
- Beifu twincat3 can read and write CSV and txt files
- Custom encapsulation drop-down component
- GO语言-管道channel
- Basic configuration and test of Beifu twincat3 NCI in NC axis interface
- E - Apple Catching
- Beifu PLC obtains system time, local time, current time zone and system time zone conversion through program
- Uva10341 solve it
- 【MySQL从入门到精通】【高级篇】(二)MySQL目录结构与表在文件系统中的表示
- Mediapipe gestures (hands)
猜你喜欢

Design of four kinds of linear phase FIR filters -- complete set of Matlab source code

Decorator

There are many contents in the widget, so it is a good scheme to support scrolling
![[how to connect the network] Chapter 2 (Part 1): establish a connection, transmit data, and disconnect](/img/e3/a666ba2f48e8edcc7db80503a6156d.png)
[how to connect the network] Chapter 2 (Part 1): establish a connection, transmit data, and disconnect

Beifu PLC realizes data power-off maintenance based on cx5130

Bigint: handles large numbers (integers of any length)

Basic configuration and test of Beifu twincat3 NCI in NC axis interface

Beifu PLC model selection -- how to see whether the motor is a multi turn absolute value encoder or a single turn absolute value encoder

What features are added to Photoshop 2022 23.4.1? Do you know anything

Prototype
随机推荐
Electron official docs series: Distribution
[how to connect the network] Chapter 2 (middle): sending a network packet
MySQL数据库讲解(四)
MediaPipe手势(Hands)
[how to connect the network] Chapter 1: the browser generates messages
[how to connect the network] Chapter 2 (next): receiving a network packet
Mysql database explanation (III)
A few lines of code can realize complex excel import and export. This tool class is really powerful!
适配器模式(Adapter)
ES6:Map
C - Common Subsequence
Uva10341 solve it
桥接模式(Bridge)
ES基於Snapshot(快照)的數據備份和還原
Luogu p3426 [poi2005]sza-template solution
Aesthetic experience (episode 238) Luo Guozheng
A primary multithreaded server model
LeetCode_ Stack_ Medium_ 150. evaluation of inverse Polish expression
shell脚本详细介绍(四)
Beifu cx5130 card replacement and transfer of existing authorization files