View my account

How to reduce "bridges" between spherical objects in depth image

Comments

11 comments

  • MartyG

    Hi Mkoelker  You could try increasing the value of the Advanced Controls setting DS Second Peak Threshold, which influences how much confidence is placed in the accuracy of depth values.  Reducing the value can fill in holes by making the criteria for acceptable depth values less strict, whilst increasing the value above its default of '325' creates more holes by being more strict with accuracy.  Increasing the Second Peak threshold may therefore open up gaps between the eggs if the depth values in those areas are inaccurate.

     

    I tested with two pebbles placed at the same distance apart as your eggs, and increasing the DS Second Peak Threshold value opened black areas of separation between the pebbles, whereas lowering the value bridged them together like in the above image.

     

    You can find the option by expanding open the Depth Control sub-category of Advanced Controls in the Viewer's options side-panel.

    0
    Comment actions Permalink
  • Mkoelker

    Hi @MartyG,
    thanks for your response. I have tried to vary the DS Second Peak Threshold parameter as you suggested, but unfortunately it didn't have the desired effect. The bridges persist, albeit they are a little bit more narrow. See the following, I have tried different threshold values (0, 325, 750, 1023). The effect is much more noticable on the shadow outline than on the bridges.

    0
    Comment actions Permalink
  • MartyG

    Because the eggs are physically touching at their edges, it will make it more difficult to perceive the eggs as separate objects.

     

    Next, please try increasing the Gain setting above the default value of '16' to introduce depth noise into the image and expand the black areas between eggs.  Gain can be found under Stereo Module > Controls

    0
    Comment actions Permalink
  • Mkoelker

    Unfortunately it is not possible to physically separate the eggs for this application. The eggs may be arranged in all kind of ways randomly. Ideally I would like to remove the bridges entirely through camera configuration, but I'm not sure if that's possible.
    If I can get the bridges to be much more narrow and sharp, then there are computer vision techniques to detect and remove them.

    The image below shows a (binarized) depth image of chicken eggs. The image is taken from a scientific paper where they used a different brand of depth camera. In this image, the bridges are very narrow and the egg shape is very clear. This makes the bridges easy to detect and remove. I don't have acess to the underlying depth image, so I don't know if the bridges are only narrow because it's been binarized.
    Compared to the depth image of the D430:
    This image is also binarized through thresholding. It's possible to reduce the bridges to a certain extent, since they lie lower than most of the egg. I could increase the threshold to the point where are bridges are gone, but then I also lose significant parts of the eggs surface, especially for eggs that are smaller in diameter. That's why i would like to solve this issue at the root and not through image processing.

    Gain setting
    The gain setting helped a little bit. In combination with the DS second peak threshold, it is possible to make the bridges a bit narrower. However, the image is nowhere near as clean as the image from the paper.

    0
    Comment actions Permalink
  • MartyG

    Further tests with pebbles found that disabling the Decimation post-processing filter in the Post-Processing section of the Viewer side-panel created further black-line separation between the edges of the two pebbles.

    0
    Comment actions Permalink
  • Mkoelker

    The decimation filter does indeed make a difference, but I wasn't using the post processing options in the first place.

    0
    Comment actions Permalink
  • MartyG

    The RealSense Viewer has a range of post-processing filters enabled by default, so disabling the filters will result in an image that is closer to one that is generated by a self-created script.

    0
    Comment actions Permalink
  • Mkoelker

    Yes, I am talking about the Realsense Viewer. I've had the Post-Processing section entirely disabled, exactly for this reason.

    0
    Comment actions Permalink
  • MartyG

    If changing camera model is an option then using the D405 model may provide better results, as it is designed for high accuracy, high quality images at close range (7 cm to 50 cm).

     

     

    If you need to use your current camera then the High Accuracy preset can create a thick black outline around objects.

    0
    Comment actions Permalink
  • Mkoelker

    I've ordered a D405 for testing. I've noticed it does not have an IR emitter, however the camera will have to be able to work in complete darkness. Does the D405 / D401 work well with external IR emitters?

    0
    Comment actions Permalink
  • MartyG

    The D405 / D401 is not able to see infrared frequencies due to a blocking IR Cut filter on its lenses.  So it would not be suited to complete darkness unless it is possible to provide short-range visible light illumination of the eggs (perhaps a red lightbulb).

    0
    Comment actions Permalink

Please sign in to leave a comment.