Closed ShawnZhou997 closed 1 day ago
我没有尝试过,不过你可以看看这项配置: synchronized_images_only
deviceConfig.color_format = K4A_IMAGE_FORMAT_COLOR_BGRA32;
deviceConfig.color_resolution = K4A_COLOR_RESOLUTION_720P;
deviceConfig.depth_mode = K4A_DEPTH_MODE_NFOV_UNBINNED;
deviceConfig.synchronized_images_only = true;
/** Only produce k4a_capture_t objects if they contain synchronized color and depth images.
*
* \details
* This setting controls the behavior in which images are dropped when images are produced faster than they can be
* read, or if there are errors in reading images from the device.
*
* \details
* If set to true, \ref k4a_capture_t objects will only be produced with both color and depth images.
* If set to false, \ref k4a_capture_t objects may be produced only a single image when the corresponding image is
* dropped.
*
* \details
* Setting this to false ensures that the caller receives all of the images received from the camera, regardless of
* whether the corresponding images expected in the capture are available.
*
* \details
* If either the color or depth camera are disabled, this setting has no effect.
*/
bool synchronized_images_only;
我没有尝试过,不过你可以看看这项配置:
synchronized_images_only
deviceConfig.color_format = K4A_IMAGE_FORMAT_COLOR_BGRA32; deviceConfig.color_resolution = K4A_COLOR_RESOLUTION_720P; deviceConfig.depth_mode = K4A_DEPTH_MODE_NFOV_UNBINNED; deviceConfig.synchronized_images_only = true;
/** Only produce k4a_capture_t objects if they contain synchronized color and depth images. * * \details * This setting controls the behavior in which images are dropped when images are produced faster than they can be * read, or if there are errors in reading images from the device. * * \details * If set to true, \ref k4a_capture_t objects will only be produced with both color and depth images. * If set to false, \ref k4a_capture_t objects may be produced only a single image when the corresponding image is * dropped. * * \details * Setting this to false ensures that the caller receives all of the images received from the camera, regardless of * whether the corresponding images expected in the capture are available. * * \details * If either the color or depth camera are disabled, this setting has no effect. */ bool synchronized_images_only;
是这样的,谢谢!
您好,我想在Azure Kinect骨骼点识别的基础上利用它的RGB图像做一些工作。 所以我在
k4a_device_configuration_t deviceConfig = K4A_DEVICE_CONFIG_INIT_DISABLE_ALL; deviceConfig.color_format = K4A_IMAGE_FORMAT_COLOR_BGRA32; deviceConfig.color_resolution = K4A_COLOR_RESOLUTION_720P; deviceConfig.depth_mode = K4A_DEPTH_MODE_NFOV_UNBINNED; // deviceConfig.color_resolution = K4A_COLOR_RESOLUTION_OFF;
这几行做了配置文件的修改,但是修改配置就会提示[2024-11-19 17:10:20.452] [error] [t=322023] /__w/1/s/extern/Azure-Kinect-Sensor-SDK/src/image/image.c (51): k4a_image_t_get_context(). Invalid k4a_image_t (nil) [2024-11-19 17:10:20.452] [error] [t=322023] /__w/1/s/extern/Azure-Kinect-Sensor-SDK/src/image/image.c (389): Invalid argument to image_get_buffer(). image_handle ((nil)) is not a valid handle of type k4a_image_t [2024-11-19 17:10:20.452] [error] [t=322023] [K4ABT] ../src/TrackerHost/DepthFrameBlobK4A.cpp (13): Initialize(). Get depth buffer from the capture handle failed! [2024-11-19 17:10:20.452] [error] [t=322023] [K4ABT] ../src/TrackerHost/TrackerHost.cpp (274): EnqueueCapture(). Initialize DepthFrameBlob failed! Error! Add capture to tracker process queue failed!
尚不清楚为何修改配置会导致只会处理一帧骨骼点数据的问题,请问作者是否有尝试获取RGB图?