c++ - Azure Kinect - 深度图像到具有一定距离的对象的多边形形状?
问题描述
目前我正在使用 Azure Kinect 开发一个应用程序。我的目标是确定与相机有一定距离的所有物体,并获得这些物体的多边形形状。但我被困在实现这个应用程序的第一步。
k4a_device_t device = nullptr;
int device_index = 0;
k4a_device_open(device_index, &device);
k4a_device_configuration_t camera_configuration = K4A_DEVICE_CONFIG_INIT_DISABLE_ALL;
camera_configuration.color_resolution = K4A_COLOR_RESOLUTION_1080P;
camera_configuration.color_format = K4A_IMAGE_FORMAT_COLOR_BGRA32;
camera_configuration.depth_mode = K4A_DEPTH_MODE_NFOV_UNBINNED;
camera_configuration.camera_fps = K4A_FRAMES_PER_SECOND_30;
k4a_device_start_cameras(device, &camera_configuration);
k4a_calibration_t calibration;
k4a_device_get_calibration(device, camera_configuration.depth_mode, camera_configuration.color_resolution, &calibration);
k4a_capture_t capture;
k4a_wait_result_t get_capture_result = k4a_device_get_capture(device, &capture, K4A_WAIT_INFINITE);
k4a_image_t image = k4a_capture_get_depth_image(capture);
uint8_t* buffer = k4a_image_get_buffer(image);
我写了一些 C++ 代码,但我不知道如何从那里继续。如何将 k4a_image_t 对象转换为可用于获得具有一定距离的对象的多边形形状的东西?我试过使用“k4a_image_get_buffer”,但“uint8_t* buffer”变量的大小只有 4 个字节。
有人有什么想法吗?
解决方案
推荐阅读
- git - 未跟踪的文件导致 git push 失败
- python - 尝试使用经度和纬度获取距离,但一直运行到错误:“系列”对象没有属性“弧度”
- azure-devops - 给定版本的拉取请求的 Azure DevOps Web 视图
- raspberry-pi3 - 使用 dt-blob.dts 配置 GPIO 引脚时,哪个 pin@pxx 对应于 40 引脚接头上的 #12?
- algorithm - 如果给定集合,则找到列表的最佳组合的算法
- python - 在与过去正常工作的完全相同的代码上收到“pytesseract not in your path”错误
- ios - UIAccessibility - 当关闭另一个视图时,将焦点设置到上一个可访问性元素
- sql - Maximum number of statements within CTE
- apache-spark - 将向量列展开为 DataFrame 中的普通列
- python - LUP (PLU) 分解因随机矩阵而失败