Giter Club home page Giter Club logo

realsensedepthimage's Introduction

[RealSense DS435 Applications]

Overview:

RealSense D400 Series Depth Cameras are for development and research mostly, not for customers. The Realsens SDK 2.0 works well on this camera but most of other workable applications on some previous realsense camera does not work well on D400 (since this one is still pretty new).

Also, compared to other Depth Cameras, comments from other customers indicates that RealSense does not have a very good depth quality. (They say kinect is better). We can see that from the real time depth viewer, the edges of the image are not very smooth. (But some research on the topic: depth completion is solving this problem)

Rough numbers on the depth accuracy: range: 0.25m - 25 m , details see hardware specs, wiki *the rgb and detph sensor have different field of view, need to be aligned

Contents :

  • SDK, APIs and environment
  • Applications and related tools
  • Our project and component
  • Reference and papers

1. SDK, APIs and environment:

Intel® RealSense™ SDK 2.0

  • Available platform:

Linux Windows MacOS Raspberry Pi 3 ( Ubuntu Mate ) Nvidia Jetson TX2

  • Tested Environment (need to build from source):

MacOS Raspberry Pi 3 ( Ubuntu Mate ) (*viewer application is very slow on raspberry pi)

  • Code Language:

C++ ( with other wrappers available like Python , NodeJS etc. )

2. Applications and related tools

3. Our project and component

####(1). Removing Background

Flow of program:

webpage: capture button -> c++ program: caputure Frame and save to disk -> fetch distance data and rgb image -> python program 1.one layer of convolution, asign invalid points (zero points) surrounding value 2.make all values to 0s and 1s 3.crop rgb image based on 0s and 1s -> display on web page

problems about depth data:

  1. Depth sensor and RGB sensor have different field of view

  2. After depth and rgb are aligned, some of distance values are invalid (zero)

alt text

  1. Choose smaller resolution, less invalid values , but there's still shadow behind objects

alt text

  1. When too close, the depth data are messed up. (mixed with zero and other higher values)

alt text


some useful demos for sdk:

Component Function notes
Realsense Viewer real time depth and rgb viewer, record rosbag file
Measure mesure object distance
Capture capture a frame and display
Save to disk save rgb frame and depth frame
Align align depth and rgb frame (since the two sensors have different field of view) , remove background and display

**our program: program on mac to save frames in folder for webpage to fetch **

code snipet: config stream resolution

    rs2::config cfg;
  cfg.enable_stream(RS2_STREAM_INFRARED, 1);
    cfg.enable_stream(RS2_STREAM_INFRARED, 2);
    cfg.enable_stream(RS2_STREAM_DEPTH, 0);
    cfg.enable_stream(RS2_STREAM_COLOR, 0,1280,720);

    rs2::pipeline_profile profile = pipe.start(cfg);

align color and depth frames and get a single frame

    profile = pipe.get_active_profile();
    align_to = find_stream_to_align(profile.get_streams());
    align = rs2::align(align_to);
  auto processed_frameset = align.process(frames);
    rs2::pipeline_profile profile = pipe.start(cfg);

  rs2::depth_frame depth = processed_frameset.get_depth_frame();
    rs2::video_frame color_frame = processed_frameset.get_color_frame();

get distance on a depth frame position/pixel

depth.get_distance(i,j) 

(2). Recorded Depth File extraction

rosbag file: Recorded file saved by the viewer

depth frame format: mono16

what can we do from a rosbag file

ROS: (Robot Operating System), often used in the robots and SLAM area

  • get meta data
  • color frame
  • depth frame

(There are many topics to select from and print out)

Playback and topic list

(3). Single Depth Completion

what is detph completion ?

To complete the depth channel of an RGB-D image. Commodity-grade depth cameras often fail to sense depth for shiny, bright, transparent, and distant surfaces

Depth images are smooth on the edges and invalid points could be solved:

*the essential step is to use a larger value to invert distance value, and dilate the image. Afterwards the values need to be inverted again back to original values

alt text

4. Reference and papers

realsensedepthimage's People

Contributors

bowenyang92 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.