Giter VIP home page Giter VIP logo

chalmers-revere / argb2i420 Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 116 KB

Microservice to convert an image in shared memory in (A)RGB layout to an image in shared memory in i420 format suitable to be used for video compression.

License: GNU General Public License v3.0

Shell 0.07% CMake 1.46% C++ 98.47%
opendlv libcluon libyuv microservice video video-processing rgb2yuv x86-64 aarch64 armhf

argb2i420's Introduction

Moved to https://git.opendlv.org.

Microservice to transform an input image in (A)RGB/(A)BGR format to I420

This repository provides source code to transform an input image in (A)RGB/(A)BGR format residing in a shared memory to an image in I420 residing in a new shared memory suitable for subsequent video compression.

License: GPLv3

Table of Contents

Dependencies

You need a C++14-compliant compiler to compile this project.

The following dependency is part of the source distribution:

The following dependency is downloaded and installed during the Docker-ized build:

Usage

To run this microservice using docker-compose, you can simply add the following section to your docker-compose.yml:

version: '2' # Must be present exactly once at the beginning of the docker-compose.yml file
services:    # Must be present exactly once at the beginning of the docker-compose.yml file
    argb2i420:
        image: chalmersrevere/argb2i420-multi:v0.0.1
        restart: on-failure
        ipc: "host"
        volumes:
        - /tmp:/tmp
        environment:
        - DISPLAY=${DISPLAY}
        command: "--in=img.argb --width=640 --height=480 --argb --out=imgout.i420"

As this microservice is connecting to an existing shared memory to read the (A)RGB/(A)BGR image for transform it into a new shared memory area using SysV IPC, the docker-compose.yml file specifies the use of ipc:host. The folder /tmp is shared into the Docker container to provide tokens describing the shared memory areas. The parameters to the application are:

  • --in: Name of the shared memory area containing the (A)RBG/(A)BGR image
  • --out: Name of the shared memory area to be created for the I420 image
  • --width: Width of the input image
  • --height: Height of the input image
  • --argb: Format of the input image (choose exactly one!)
  • --rgb: Format of the input image (choose exactly one!)
  • --abgr: Format of the input image (choose exactly one!)
  • --bgr: Format of the input image (choose exactly one!)
  • --verbose: Display decoding information and render the image to screen (requires X11; run xhost + to allow access to you X11 server)

Build from sources on the example of Ubuntu 16.04 LTS

To build this software, you need cmake, C++14 or newer, libyuv, libvpx, and make. Having these preconditions, just run cmake and make as follows:

mkdir build && cd build
cmake -D CMAKE_BUILD_TYPE=Release ..
make && make test && make install

License

  • This project is released under the terms of the GNU GPLv3 License

argb2i420's People

Contributors

chrberger avatar fannygu avatar

Watchers

 avatar  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.