Giter Site home page Giter Site logo

manabuo / surface-streams Goto Github PK

View Code? Open in Web Editor NEW

This project forked from floe/surfacecast

0.0 0.0 0.0 9.06 MB

SurfaceStreams: send background-subtracted depth camera video via GStreamer (with optional perspective correction)

License: GNU Lesser General Public License v3.0

Makefile 3.60% C++ 68.07% Python 2.28% Shell 21.80% C 4.25%

surface-streams's Introduction

SurfaceStreams

Sends background-subtracted depth camera video via GStreamer (left: raw video, center: rectified, right: background removed).

realsense example

This tool records live video of a flat surface with a depth camera, automatically detects the background plane, subtracts that from the video, and sends the result to a GStreamer pipeline. Everything that is part of the background within a configurable distance will turn bright green so it can be used with other GStreamer filters, e.g. using alpha method=green and videomix. Optionally, an arbitrary quadrilateral area in the raw image can be extracted and rectified before streaming (e.g. a projection screen).

SurfaceStreams Video

Usage

By default, all executables will run the GStreamer pipeline videoconvert ! fpsdisplaysink to provide a debug view. If you want any other pipeline, pass it as a single commandline parameter, e.g. ./realsense "jpegenc ! rtpgstpay ! udpsink" to stream the compressed view over a network. In the debug view, the following commands are available:

  • space - reset the perspective transformation
  • mouse - create new perspective transformation
    • click the 4 corners of the desired quadrilateral area in succession
    • first click defines top-left corner, rest in clockwise order
    • transformation will be saved as perspective.xml in current directory
  • p - re-run the RANSAC plane detection
  • f - toggle filtering of the background plane
  • + - increase the tolerance wrt background by 0.2cm
  • - - decrease the tolerance wrt background by 0.2cm
  • q - exit program

Supported/tested devices:

  • Intel Realsense D415
  • Microsoft Kinect v2
  • Samsung SUR40
  • Generic Video4Linux2 camera (without background subtraction)

Library requirements:

License

SurfaceStreams is licensed under the GNU Lesser General Public License v3.0.

random notes

  • UDP ports:
    • 500x: surface stream, 1280x720, MJPEG in GStreamer buffers
    • 600x: front cam stream, 1280x720, MJPEG in GStreamer buffers
    • 700x: raw audio stream in GStreamer buffers
  • camera USB bandwidth allocation is a problem
    • needs uvcvideo quirks parameter (see uvcvideo.conf) and limited FPS
    • check with: $ cat /sys/kernel/debug/usb/devices | grep "B: "
  • inconsistent camera device naming is fixed by 99-camera-symlink.rules
  • default SUR40 table display size: 89x50cm

surface-streams's People

Contributors

alberth avatar alishug avatar christiankerl avatar floe avatar fran6co avatar gaborpapp avatar goldhoorn avatar hanyazou avatar henningj avatar joshblake avatar laborer2008 avatar larshg avatar mugofpaul avatar rjw57 avatar tabjones avatar wassabivl avatar xlz avatar yuanmingze 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.