Intel Realsense Test & Demo Application

Description

This application is for testing and demonstrating the use of Intel RealSense Depth Camera API Android wrappers (by itself and in conjunction with OpenCV). It has the following features:

  • Allows the user to save the point cloud as a CSV file.
  • Allows the user to stream the color and colorized depth images onto the UI. It uses the librealsense.GLRsSurfaceView control of the Intel API only, therefore the color and depth streams are given directly to this control as API-specific frames.
  • Allows the user to stream the heavily-processed color and colorized depth images onto the UI. It uses the librealsense.GLRsSurfaceView control of the Intel API only, therefore the color and depth streams are given directly to this control as API-specific frames. The processing includes:
    • Decimation filter
    • Threshold filter
    • Colorize filter
    • Align filter
    • Hole filling filter
    • Temporal filter
    • Spatial filter
  • Allows the user to stream the color and colorized depth images onto the UI using the OpenCV library and native ImageView; it acquires the Frame objects of Intel API, then converts them to OpenCV Mat objects, which are later converted to native Bitmap objects to be displayed on the UI within a simple ImageView. It also includes an optional hole-filling filter and an always-on align filter.
  • Implementing the C++ sample given by Intel to apply the Grab-Cut algorithm for removing the background, on an Android device. It has slight implementation differences, such as using Core.compare instead of ==, since operator overloading of Mat is not available on Android.
  • A modified grab cut algorithm such that the foreground is determined by the distance of the central pixel. Instead of setting the foreground as the depth pixels having values greater than 180 (i.e. closest objects), the pixels in the neighborhood of the central pixel in the grayscale depth image are used.
  • A new algorithm that aims to obtain the same output of the Grab-Cut algorithm with much less computing power. It uses the ratio of the central pixel distance (depth) in the real world and depth image to calculate a threshold for near and far boundaries and uses these borders to mask out the foreground and background.
  • An activity that draws the line chart that exhibits the distance values along the x-axis (horizontal) on the mid-height of the depth image. It displays the COLOR stream and the depth chart on the UI.
  • An activity performing real-world width measurements by combining the distance mask approach with the point cloud. It implements two approaches for finding the real-world value of the target width.

Technology