View my account

Noise around segmented object

Comments

9 comments

  • MartyG

    Hi Fpelegri  You could set a visual preset camera configuration to see if it reduces the sharpness of the edges. If you are using Python then a reference for doing so can be found at the link below.

    https://github.com/IntelRealSense/librealsense/issues/2577#issuecomment-1330216430

     

    Information about presets is here:

    https://dev.intelrealsense.com/docs/d400-series-visual-presets#preset-table

     

    The Default preset can produce cleaner edges, whilst Medium Density can make edges more rounded.

    0
    Comment actions Permalink
  • Fpelegri

    Result is much better, but now the light is generating a hole inside the object...any other preset recommendation?

    0
    Comment actions Permalink
  • MartyG

    If you are using a RealSense 400 Series camera model that is equipped with a projector, how is the image affected if you disable the projector's IR emitter to turn off its light source?

     

    import pyrealsense2 as rs
    pipeline = rs.pipeline()
    config = rs.config()
    pipeline_profile = pipeline.start(config)
    device = pipeline_profile.get_device()
    depth_sensor = device.query_sensors()[0]
    if depth_sensor.supports(rs.option.emitter_enabled):
    depth_sensor.set_option(rs.option.emitter_enabled, 0)
    0
    Comment actions Permalink
  • Fpelegri

    Well, I have this box at a 0.6m of distance and there is a light that is generating this black gap in the middle, I used the phone lantern to find out that glares are generating that hole.

    0
    Comment actions Permalink
  • MartyG

    Thank you.  Disabling the IR emitter can have the side-effect of reducing the amount of detail on the depth image, unless the scene is well illuminated so that the camera can make use of that ambient light to aid depth analysis instead.  If increasing the illumination in the vicinity of the camera is not an option then having the emitter enabled will be required.  

     

    The negative effects on an image of glare from reflections can be negated if a thin-film linear polarizer product is purchased and placed over the left and right camera lenses on the outside of the camera.  Any thin-film polarizer that is linear should work, so they are relatively affordable.  The circular polarizers used most often in 3D glasses won’t work though.  You can search stores such as Amazon for the term linear polarizer sheet  

     

    Filters can be attached firmly to the outside of the camera either by 3D-printing a custom-made clip or using a simpler solution such as wrapping rubber bands around the camera to hold the filter on.

     

    If you would prefer to resolve the hole with program scripting, applying a Hole-Filling Filter post-processing filter may be a suitable solution.

    https://github.com/IntelRealSense/librealsense/issues/9899

    0
    Comment actions Permalink
  • Fpelegri

    Hole-Filling Filter did the job!

    Another issue I had was the little speckles on the image, I don't know if there's another filtering parameter on the camera to consider. I can post-process the image and remove them, but as much the camera can do for me, it'd better.

    Thanks!

    (If you know any suggestion of the speckles, much appreciated! 🙂 )

     

    0
    Comment actions Permalink
  • MartyG

    If you used hole_filling = rs.hole_filling_filter(2) then you could try '1' in the brackets instead, as mode 1 ('farthest from around' - use the value from the neighboring pixel which is furthest away from the sensor) is the RealSense SDK's default for the hole-filling filter.

    0
    Comment actions Permalink
  • Fpelegri

    I tried the 3 options:

    The mode numbers are: (Ref link)

    • 0 = fill_from_left - "Use the value from the left neighbor pixel to fill the hole"
    • 1 = farest_from_around - "Use the value from the neighboring pixel which is furthest away from the sensor"
    • 2 = nearest_from_around - "Use the value from the neighboring pixel closest to the sensor"

     

    0 = fill_from_left

     

    1 = farest_from_around

     

    2 = nearest_from_around

     

    Options 1 and 2 are giving me a good result, the option 1 I think is the best fit, also with direct light on it that caused a big hole in it caused by light reflection.

    I will explore more depth filter options in order to find the most accurate shape. If I found something much better I'll post it here in order to log it.

     

    Thanks for you help! 

     

    0
    Comment actions Permalink
  • MartyG

    You are very welcome  :)

    0
    Comment actions Permalink

Please sign in to leave a comment.