Skip to main content

NDU Gate Camera Service

Project description

ndu-gate - NDU Gate Camera Service

This is a service project that run on edge devices and servers to consume videos sources(camera, file etc.) and process them.

Installation

Using .deb package

Go relases and download latest .deb package and run the following command.

sudo dpkg -i ./python3-ndu-gate.deb

Building .deb package

sudo ./generate_deb_package.sh

Using pip package

python3 -m pip install --upgrade ndu-gate-camera
  • installation without dependencies
python3 -m pip install --upgrade --no-deps ndu-gate-camera

Running with cli

ndu-gate -c config-file-path.yaml

API

NDUCameraRunner

It is a interface class(api/ndu_camera_runner.py) that sould be impelemented to process source frames according to different use-cases.

VideoSource

It is a interface class (api/video_source.py) that should be implement to stream different type of video sources.

ResultHandlers

It is the interface class (api/result_handler.py) that decides how to manage the data produced by runners.

  • FILE - ResultHandlerFile - Writes the data to the specified file
  • SOCKET - ResultHandlerSocket - Sends the data to the specified socket connection
  • MQTT - ResultHandlerMqtt - Sends the data NDU platform using MQTT Gateway API
  • HTTP - ResultHandlerRequest - TODO - Sends data to the specified service via HTTP(S)

Settings

  • ndu-gate service global settings /etc/ndu-gate/config/ndu_gate.yaml

  • Logging settings : /etc/ndu-gate/config/logs.conf

See more at NDU-GATE.YAML Configuration


Development

More details at NDU-Gate Development Help

Adding New Runner

You can a new implemented runner to this service.

  • Create a folder under /var/lib/ndu_gate/runners/. This folder name should be unique.
  • Add your NDUCameraRunner implementation python file to /var/lib/ndu_gate/runners/ folder.
  • Add your runner's config file to /etc/ndu-gate/config/
  • Then to activiate your runner, add the following settings top under instance runners collection in /etc/ndu-gate/config/ndu_gate.yaml file
    instance:
      - source
        type: CAMERA
        device: MyLapCamera # optional
        runners:
          - name: My Runner
            type:  # this should be same with <folder-name>
            configuration: <folder-name>.json # optional
            class: MyRunner # The class name your runner class

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ndu_gate_camera-0.1.9.18.tar.gz (45.4 kB view hashes)

Uploaded Source

Built Distribution

ndu_gate_camera-0.1.9.18-py3-none-any.whl (55.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page