dji-sdk / Guidance-SDK

The official Guidance SDK package for Windows, Ubuntu and XU3.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incomplete depth imagery

mcguire-steve opened this issue · comments

When using the usb_example on x64 Linux, my depth images have a ~70px black border on the left side. This represents almost a quarter of the image and decreases the utility of the depth output. Can this be resolved? Screenshot attached.
guidance_black_bar_depth

Hey, can you try my fork of the Guidance-ROS-SDK, and see if that helps? I have explained in the last section of the Readme here https://github.com/madratman/Guidance-SDK-ROS and made a pull request here dji-sdk/Guidance-SDK-ROS#5

I appreciate the input, but using a CPU solution isn't the answer. Somebody from DJI needs to address this problem. According to the documentation of Guidance, the FPGA pipeline should be able to do the stereo reconstruction to produce a depth map - I don't have the CPU resources to do this on a host in my application. That's the whole point of spending the money on this system vs using discrete cameras and a software pipeline.

Currently several left most columns do not have depth values, due to that stereo matching doesn't have enough search range and can't give accurate estimation. Therefore we choose not to provide those inaccurate values.

Agreed @mcguire-steve. I have an odroid onboard though.
@tangketan, so maybe this is another reason to provide raw images so that we can play around as well. But, what @mcguire-steve mentioned is important as well.
Also, if you guys have more suggestions about the PR, I would be interested in trying my hand.

Just to clarify, Guidance is incapable of producing a full depth image? Just looking back, even the examples have this behavior exhibited, for example on the https://developer.dji.com/guidance-sdk/guide/visual_Tracking_tutorial/

From the specifications at https://developer.dji.com/guidance-sdk/features/:
"Guidance outputs 16 bit depth images from stereo cameras at maximum frequency 20Hz, and fixed resolution 320x240"

Given that the output is actually more like 240x240 makes the specifications misleading at best and flat-out wrong at worst. When will Guidance be able to support the advertised feature?

Yes, currently we can only provide a non-full depth image, which is registered to the left grayscale image. However we have the potential to provide full depth images. We'll try to provide full depth images.
@madratman Raw images are a bit difficult due to bandwidth limitation. We'll see how to approach this issue.

Is it just me or are the Guidance depth images incredibly noisy compared to what you get just by doing standard OpenCV block matching e.g. using ROS stereo_image_proc? I getting something similar to what Steve has in his screenshot. Are we expected to filter the depth images before using them?

Yes, you are suggested to filter the depth images before use. We provide the raw depth image, and it is a usual practice to filter depth images before use (usually we use filterSpeckeor median).

Thanks for the tip, it definitely helps. My images are still quite noisier than what I see in the paper. Could you suggest settings for filterSpeckle?

@andre-nguyen It really depends on your application. I can only provide a reasonable range: newVal=-16, maxSpeckleSize in [50,500], maxDiff = [1,3]*multiplier (16 for 4-bit fraction disparity).

Thanks! Also, if you don't mind, what is your opinion on the bilateral filter compared to filterspeckle?

@andre-nguyen Bilateral filter will blur the depth image, while filterSpeckle only affects speckles. If we need to present the depth image to a human, bilateral filter is good, otherwise I prefer speckle filter.