Git Product home page Git Product logo

manifold-cam's Introduction

What's This?

The manifold_cam project implements a functionality to get H.264 video stream from DJI Zenmuse X3 camera, decode and display the video in realtime. What's more, it also allows developers to transfer stream data to the mobile APP.

This package is specially designed for DJI Manifold. It doesn't support any other platform.

Requirements

  • GStreamer, FFmpeg, libusb (Install already)
  • libdcam.so, Manifold camera driver library

Quick Start

0. Connecting Manifold to the Camera

Connect the 8-pins port on the camera to the CAM_IN port through the supplied 8-pins cable. Then, connect the CAM_OUT port to the 8-pins port on the N1 flight controller on the Matrice 100. Finally, connect the 10- pins port from the N1 flight controller to the 10 pins port on the gimbal camera.

1. Compile with makefile

 $ sudo make install     //install the libdcam.so to /usr/lib, you need to install the library first
 $ make                  //compile to the obj file 'test'
 $ make clean            //remove the obj file and intermediate files

2. Run it

 $ sudo ./test [-dgt]

Usage:

  • -d --display display video stream
  • -g --getbuffer get NV12 format buffer
  • -t --transfer transfer video datas to RC

SSH

This program needs a graphical library from xinit&, which won't be found when working with SSH.

To solve it:

  1. (Optional) Disable lightdm for stability:

    in /etc/init/lightdm.conf line 12:

    Modify runlevel [!06] to runlevel [!026]

  2. Add xinit& to a startup script, such as:

    echo -e '#!/bin/bash\nxinit&' > /home/ubuntu/pre_x3
    chmod a+x /home/ubuntu/pre_x3
    

    And add /home/ubuntu/pre_x3 into /etc/rc.local. The ubuntu here is the current user, you may need to change it into yours.

  3. Add export DISPLAY=:0 to your .bashrc or remember to set this environment variable to THE USER WHO WILL RUN THE CODE

  4. (Maybe a reboot at first) Run the ./test with paramters you want.

This part is contributed by @groundmelon, check his repository for more detail.

Note

  • d and g cannot be used at the same time
  • DJI GO APP is not necessary. If the APP is running, developers should tap enter camera view and it's very important that the APP should always be in camera view mode.
  • The resolution of image frame is 1280 X 720, and the format is NV12

Other

The resource of Manifold:

  1. The user manual: https://dl.djicdn.com/downloads/manifold/en/Manifold_User_Manual__en__v1.0.pdf
  2. The system image: https://dl.djicdn.com/downloads/manifold/manifold_image_v1.0.tar.gz

manifold-cam's People

Contributors

lanyusea avatar dji-dev avatar williamlidji avatar godwang23 avatar oliverou avatar

Watchers

James Cloos avatar CAL 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.