Closed constantin-ulbrich closed 4 years ago
Can you please verify that your USB host controller is one of the supported controllers? See here. Assuming you are using a supported USB host controller then the next step is to provide Azure Kinect logs.
Thank you very much for your help! I have checked the USB host controller and my machine uses one of the supported ones (Intel(R) USB 3.0 eXtensible-Hostcontroller-1.0(Microsoft)). However, unlike on the example image provided in the Docs to check for the USB host controller, my machine's device structure has three nested Generic SuperSpeed USB Hubs. I am not sure if that makes a difference, so I just wanted to mention it to double check. The device connection structure can be viewed in the screenshot below.
Also, I have tested it for every USB port of my PC. The device connection structure always remained the same as shown in the screenshot.
Below, I have generated new Azure Kinect logs, one for each output:
The file named "k4a_output1_capturing_color_image.log" contains the logs, when running the code the first time after plugging in the Kinect. When running the code, I obtain a color image, but no depth- or IR-image.
k4a_output1_capturing_color_image.log
The file named "k4a_output2_capturing_no_color_image.log" contains the logs, when running the code the second time, without having unplugged and reconnnected the Kinect. The output of the code results in a failure to caputre the color-image, but the depth- and IR-image are captured.
k4a_output2_capturing_no_color_image.log
Please, let me know if I should alter the detail level of the logs. Again, thank you very much for your help!
You are seeing differences in warm / cold startup behavior. You are running with the synchronized_images_only
in k4a_device_configuration_t
set to false, which means you get all frames, even if we can't sync a color frame to depth/IR frames. If you set this to true, then your captures will always have synchronized color, IR, and depth (depth is not present for passive IR mode). With this setting enabled you can even remove the image NULL checks you have.
Great, thank you very much for your help. This resolved the bug.
Hi Kinect DK community,
I have been trying to use the Kinect for a computer vision application in my university thesis project. As I haven't used the Kinect before and only have basic coding knowledge in C, I thought that I familiarize myself with the Kinect by building a simple console application first. This application uses to a large extent the example code provided in the Microsoft Docs (https://docs.microsoft.com/en-us/azure/kinect-dk/retrieve-images). The application should capture an image and then retrieve the Color-, IR-, and Depth-Image. Subsequently, for each of the retrieved image types the application should print to the console the resolution and stride of the image if the application retrieves the images correctly. If the retrieval of the image is unsuccessful, then the message 'Image is null!' should be printed to the console. The problem arises if I run the code more than once, after plugging in the device. When running the code the second time, the application fails to retrieve the Color-Image from the capture. Unfortunately, being able to retrieve the Color-Image plays a central role in the application I'm building for my thesis. Sadly, after several hours of debugging and attempting different solutions, I still could not fix this bug. Also, I am starting to be a little clueless, what the issue could be. Has anyone experienced a similar issue or is able to help?
Some additional information:
Here are the steps to reproduce the issue:
Is there something which is missing to initialize the device or something which needs to be done to properly close the device?
Below, you can find the output of a successful run, the output of an unsuccessful run, and the source code.
Thank you very much for your help!
Output after first time running the code:
Output after running the code the second time (note, there are only two image resolutions, as well as the message 'Image is null!' printed):
Source Code: