microsoft / Azure-Kinect-Sensor-SDK

A cross platform (Linux and Windows) user mode SDK to read data from your Azure Kinect device.
https://Azure.com/Kinect
MIT License
1.5k stars 619 forks source link

External Sync Trigger Device causes Black/White purple frame artefacts #1404

Closed PaulSachse closed 3 years ago

PaulSachse commented 4 years ago

Describe the bug I use an external microcontroller (STM32F103) to provide a sync signal for my Azure Kinect and an external IMU. When operating the kinect in standalone mode, the video transmission is without error. However when setting kinect recorder to: k4arecorder --external-sync sub --rate 15 --depth-mode WFOV_UNBINNED test.mkv I begin to experience some black/white/purple frames on a regular basis throughout the video sequence.

As suggested in issue 1227 https://github.com/microsoft/Azure-Kinect-Sensor-SDK/issues/1227 i replicated the pulse the kinect would give when its set as Master device itself which is a 15 Hz, ~12 uS Pulse Width, 5V Pulse as i measured with the oscilloscope. Even though i replicated the pulse with my microcontroller as external sync source the kinect produces odd and non deterministic random frame errors. When i operate the Kinect without the sync signal, the frame artefact errors disappear.

To Reproduce

1) Connect kinect to external signal generator (microcontroller i.e. STM32) 2) Set external signal generator frequency to 5 or 15 in both NFOV or WFOV modes 3) Start Azure recording in slave mode. 4) Start external signal generator

Expected behavior

No black/pink/white error frames are recorded.

Screenshots Screenshot from 2020-10-27 23-27-19

Desktop:

qm13 commented 4 years ago

The pulse width of your external sync signal is either too long or too short. Record the pulse signal from an Azure Kinect device and mimic.

PaulSachse commented 4 years ago

The pulse width of your external sync signal is either too long or too short. Record the pulse signal from an Azure Kinect device and mimic.

Thats what i did, i replicated the pulse of the kinect master device which happens to be a 12 microsecond 5V pulse. Any further ideas?

qm13 commented 3 years ago

@PaulSachse what happens if you use another Azure Kinect to generate the sync signal? Do you still get a purplish image?

Johunt-feng commented 2 years ago

The pulse width of your external sync signal is either too long or too short. Record the pulse signal from an Azure Kinect device and mimic.

Thats what i did, i replicated the pulse of the kinect master device which happens to be a 12 microsecond 5V pulse. Any further ideas?

I also encountered the same problem. How did you solve it in the end?