Giter Site home page Giter Site logo

strott / argus_camera Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nvidia-ai-iot/argus_camera

0.0 1.0 0.0 57 KB

Simple Python / C++ interface to CSI camera connected to NVIDIA Jetson.

License: BSD 3-Clause "New" or "Revised" License

CMake 9.94% Python 11.15% C++ 78.91%

argus_camera's Introduction

Argus Camera interface for Jetson

This project provides a simple Python / C++ interface to CSI cameras on the Jetson using the Tegra Multimedia API and the LibArgus. All images are returned in RGBA format for easy processing.

Please note that this project experimental and is provided as a convenience for prototyping. This may not work for all CSI cameras, but has been tested for those in the table below.

Cameras

Camera Model Sensor Modes Frame Rates
Jetson DevKit Camera TBD TBD

Setup

Ensure that you have flashed your Jetson to include the Tegra Multimedia API. Then, simply clone this repository and enter the following into a terminal.

sudo apt-get install cmake python-pip swig
cd argus_camera
mkdir build
cd build
cmake ..
make -j4
sudo make install
cd ..
sudo python setup.py install

If you are using Python 3 you replace the last command with

sudo python3 setup.py install

Python Usage

Here we show a simple example to acquire an image from the devkit camera.

from argus_camera import ArgusCamera

camera = ArgusCamera()
image = camera.read()

The camera can be initialized with different configurations. For example, we can set the output resolution to 300x300 pixels and crop the input to use the center of the image.

camera = ArgusCamera(
  stream_resolution=(300, 300),
  video_converter_resolution=(300, 300), 
  source_clip_rect=(0.25, 0.25, 0.75, 0.75),
)

The video converter resolution corresponds to the output resolution. The stream resolution is the resolution the stream is set to before image resizing by the video converter. For simplicity, set both to the same value.

For more configuration options type help(ArgusCamera).

argus_camera's People

Contributors

jaybdub avatar

Watchers

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