All Projects → floe → surfacecast

floe / surfacecast

Licence: LGPL-3.0 license
SurfaceCast: send background-subtracted depth camera video via GStreamer (with optional perspective correction)

Programming Languages

C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language
shell
77523 projects
c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to surfacecast

realsense-processing
Intel RealSense 2 support for the Processing framework.
Stars: ✭ 70 (+218.18%)
Mutual labels:  camera, realsense
buildLibrealsense2TX
Build librealsense 2.0 library on the NVIDIA Jetson TX Development kit. Intel RealSense D400 series cameras.
Stars: ✭ 54 (+145.45%)
Mutual labels:  camera, realsense
Rtspallthethings
Deprecated RTSP media server -- Use github.com/aler9/rtsp-simple-server instead.
Stars: ✭ 258 (+1072.73%)
Mutual labels:  camera, gstreamer
node-gstreamer-superficial
Superficial gstreamer binding
Stars: ✭ 111 (+404.55%)
Mutual labels:  gstreamer
OLSTEC
OnLine Low-rank Subspace tracking by TEnsor CP Decomposition in Matlab: Version 1.0.1
Stars: ✭ 30 (+36.36%)
Mutual labels:  background-subtraction
AACS
Android Auto Server encapsulates communication with modern car infotainment system
Stars: ✭ 138 (+527.27%)
Mutual labels:  gstreamer
qrcode-decoder
🤘Tool for decoding qrcode by image,video or camera.
Stars: ✭ 78 (+254.55%)
Mutual labels:  camera
parlatype
GNOME audio player for transcription
Stars: ✭ 151 (+586.36%)
Mutual labels:  gstreamer
OpenDepthSensor
Open library to support Kinect V1 & V2 & Azure, RealSense and OpenNI-compatible sensors.
Stars: ✭ 61 (+177.27%)
Mutual labels:  realsense
APStreamline
Live Video Streaming Made Easy!
Stars: ✭ 98 (+345.45%)
Mutual labels:  gstreamer
telecarla
TELECARLA: An Open Source Extension of the CARLA Simulator for Teleoperated Driving Research Using Off-the-Shelf Components
Stars: ✭ 34 (+54.55%)
Mutual labels:  gstreamer
Intel-Realsense-Hand-Toolkit-Unity
Intel Realsense Toolkit for Hand tracking and Gestural Recognition on Unity3D
Stars: ✭ 72 (+227.27%)
Mutual labels:  realsense
Perspec
Scriptable desktop app to correct the perspective of images
Stars: ✭ 523 (+2277.27%)
Mutual labels:  perspective-transformation
gstreamer-rtc-streamer
webrtc streamer based on gstreamer
Stars: ✭ 65 (+195.45%)
Mutual labels:  gstreamer
overscan
A live coding environment for live streaming video
Stars: ✭ 36 (+63.64%)
Mutual labels:  gstreamer
kms-filters
Filter elements for Kurento Media Server
Stars: ✭ 15 (-31.82%)
Mutual labels:  gstreamer
MJMediaPicker
A Custom Class to select media from camera ,video or photo library by just adding a single file
Stars: ✭ 15 (-31.82%)
Mutual labels:  camera
subtitleeditor
Subtitle Editor is a GTK+3 tool to create or edit subtitles for GNU/Linux/*BSD.
Stars: ✭ 79 (+259.09%)
Mutual labels:  gstreamer
Evp3
Volumetric visual effects program used in Unite Shanghai 2019
Stars: ✭ 81 (+268.18%)
Mutual labels:  realsense
realsense samples ros
Sample code illustrating how to develop ROS applications using the Intel® RealSense™ ZR300 camera for Object Library (OR), Person Library (PT), and Simultaneous Localization And Mapping (SLAM).
Stars: ✭ 121 (+450%)
Mutual labels:  realsense

SurfaceCast

SurfaceCast 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 it 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

Building/Requirements

Reference platform: Ubuntu 20.04.

sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libopencv-dev libeigen3-dev v4l2loopback-dkms
# optional, needs Microsoft Kinect & Intel Realsense repos:
# sudo apt install libk4a1.4-dev librealsense2-dev
make && sudo make install

Usage

Example 1 - debug/config view of plain webcam: ./surfacecast v4l2 /dev/video0

Example 2 - stream Realsense to virtual camera device: ./surfacecast realsense 0 "videoconvert ! video/x-raw,format=RGB,width=1280,height=720 ! v4l2sink device=/dev/video20" (mind the quotes around the GStreamer pipeline)

For setting up the virtual camera, install v4l2loopback-dkms, copy config/v4l2loopback-autoload.conf to /etc/modules-load.d/ and config/v4l2loopback-options.conf to /etc/modprobe.d/, and run sudo modprobe v4l2loopback (also part of make install).

Example 3 - simple network stream of Kinect Azure: ./surfacecast k4a 0 "jpegenc ! rtpjpegpay ! udpsink host=..."

By default, 1280x720 RGB video data will be sent to the GStreamer pipeline videoconvert ! fpsdisplaysink to provide a debug view. If you want any other pipeline, pass it as a single quoted commandline parameter. In the debug view, the following hotkeys 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
  • 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
  • s - save current parameters (tolerance, perspective, plane) to config.xml
  • b - blank the output (i.e. 100% green). Can also be toggled via killall -USR1 surfacecast.
  • q - exit program

If config.xml is present in the working directory at startup, parameters are re-initialized with saved values.

Supported/tested devices:

  • Generic Video4Linux2 camera (without background subtraction)
  • Samsung SUR40 (with brightness-based background subtraction)
  • Intel Realsense D415/D435
  • Microsoft Kinect Azure
  • Virtual Camera

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].