All Projects → AravisProject → Aravis

AravisProject / Aravis

Licence: lgpl-2.1
A vision library for genicam based cameras

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Aravis

Multi sensor fusion
Multi-Sensor Fusion (GNSS, IMU, Camera) 多源多传感器融合定位 GPS/INS组合导航 PPP/INS紧组合
Stars: ✭ 357 (-10.08%)
Mutual labels:  camera, vision
React Native Vision Camera
📸 The Camera library that sees the vision.
Stars: ✭ 443 (+11.59%)
Mutual labels:  camera, vision
VisionLab
📺 A framework with common source code for demo projects that use Vision Framework
Stars: ✭ 32 (-91.94%)
Mutual labels:  camera, vision
Nextlevel
NextLevel was initally a weekend project that has now grown into a open community of camera platform enthusists. The software provides foundational components for managing media recording, camera interface customization, gestural interaction customization, and image streaming on iOS. The same capabilities can also be found in apps such as Snapchat, Instagram, and Vine.
Stars: ✭ 1,940 (+388.66%)
Mutual labels:  camera, vision
Vision CoreML-App
This app predicts the age of a person from the picture input using camera or photos gallery. The app uses Core ML framework of iOS for the predictions. The Vision library of CoreML is used here. The trained model fed to the system is AgeNet.
Stars: ✭ 15 (-96.22%)
Mutual labels:  camera, vision
vision-camera-image-labeler
VisionCamera Frame Processor Plugin to label images using MLKit Vision
Stars: ✭ 62 (-84.38%)
Mutual labels:  camera, vision
Grip
Program for rapidly developing computer vision applications
Stars: ✭ 314 (-20.91%)
Mutual labels:  camera, vision
Android Goldeneye
A wrapper for Camera1 and Camera2 API which exposes simple to use interface.
Stars: ✭ 356 (-10.33%)
Mutual labels:  camera
Home Platform
HoME: a Household Multimodal Environment is a platform for artificial agents to learn from vision, audio, semantics, physics, and interaction with objects and other agents, all within a realistic context.
Stars: ✭ 370 (-6.8%)
Mutual labels:  vision
Wallpaper
透明屏幕
Stars: ✭ 348 (-12.34%)
Mutual labels:  camera
Movie Monad
📺 A free and simple to use video player made with Haskell.
Stars: ✭ 347 (-12.59%)
Mutual labels:  gtk
Easy handeye
Automated, hardware-independent Hand-Eye Calibration
Stars: ✭ 355 (-10.58%)
Mutual labels:  camera
Fotoapparat
Making Camera for Android more friendly. 📸
Stars: ✭ 3,704 (+833%)
Mutual labels:  camera
Sunflower
Small and highly customizable twin-panel file manager for Linux with support for plugins.
Stars: ✭ 347 (-12.59%)
Mutual labels:  gtk
Gaphor
Gaphor is the simple modeling tool
Stars: ✭ 386 (-2.77%)
Mutual labels:  gtk
Adapta Gtk Theme
An adaptive Gtk+ theme based on Material Design Guidelines
Stars: ✭ 3,443 (+767.25%)
Mutual labels:  gtk
Foggycam
📹 A tool to locally capture your own Nest camera stream.
Stars: ✭ 391 (-1.51%)
Mutual labels:  camera
Pickimage
Shows a DialogFragment with camera and gallery options. User can choose wich provider wants to pick images from. 📸 🖼️
Stars: ✭ 386 (-2.77%)
Mutual labels:  camera
Wxwidgets
wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls.
Stars: ✭ 3,994 (+906.05%)
Mutual labels:  gtk
Cameraview
📸 A well documented, high-level Android interface that makes capturing pictures and videos easy, addressing all of the common issues and needs. Real-time filters, gestures, watermarks, frame processing, RAW, output of any size.
Stars: ✭ 4,137 (+942.07%)
Mutual labels:  camera

Build Status Codacy Badge

What is Aravis ?

Aravis is a glib/gobject based library for video acquisition using Genicam cameras. It currently implements the gigabit ethernet and USB3 protocols used by industrial cameras. It also provides a basic ethernet camera simulator and a simple video viewer.

Aravis is released under the LGPL v2+.

Installing Aravis

Aravis uses the meson build system ( http://mesonbuild.com/ ). After you have downloaded the latest release from http://ftp.gnome.org/pub/GNOME/sources/aravis, you can build and install Aravis like any other meson project:

meson build
cd build
ninja
ninja install

The build can be configured at any time using meson configure in the build directory. meson configure invoked without any other argument will show the configuration options.

On some platforms (like Ubuntu), you may have to configure the dynamic linker (ld) to let it know where the aravis libraries are installed, and run ldconfig as root in order to update ld cache.

Building on macOS

Using the GNU build system on macOS is not directly supported, but can be mimicked by augmenting the install procedure above with some environment settings (tested on macOS Catalina):

brew install gettext intltool gtk-doc libxml2 meson libusb
meson build
ninja -C build

If you want to be able to build the viewer, you have to install some additional packages:

brew install gtk+3 gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad libnotify gnome-icon-theme
meson configure -Dviewer=enabled

Python bindings and camera simulator are not functional yet.

Ethernet Device Performance

Stream Packet Size

One way to increase streaming performance is to increase the stream packet size. arv_camera_gv_set_packet_size() and arv_camera_gv_auto_packet_size() allow you to change this parameter. By default, the network adapter of your machine will probably not let you receive packet bigger than 1500 bytes, which is the default Maximum Transfer Unit (MTU). It means if you want to use big packets, you also have to increase the network adapter MTU to a greater walue (8192 bytes being a recommended value). The exact procedure to change the MTU depends on the distribution you are using. Please refer to the administrator manual of your distribution.

On Fedora, MTU can be changed using the network setting panel. Edit the wired network settings. MTU parameter is in the Identity page.

On Debian / Ubuntu you can add a line "mtu 8192" to /etc/network/interfaces under the correct device.

iface ethusb0 inet static
	address 192.168.45.1
	netmask 255.255.255.0
	broadcast 192.168.45.255
	mtu 8192

Please note if your device is not connected directly to the machine, you may also have to tweak the active devices on your network.

Packet Socket Support

Aravis can use packet sockets for the video receiving thread. But this mode requires extended capabilities. If you want to allow your application to use packet socket, you must set the cap_net_raw capability using setcap. For example, the following command gives this capability to the Aravis viewer (You should do this on the installed arv-viewer executable, has the one in the source tree is just a wrapper shell script):

sudo setcap cap_net_raw+ep arv-viewer

USB Permissions

By default, USB devices permissions may not be sufficient to allow any user to access the USB3 cameras. This permissions can be changed by using an udev rule file. There is a file example in Aravis sources, src/aravis.rules. This file must be placed in /etc/udev/rules.d directory (The exact location may depend on the distribution you are using). This file only contains declarations for a couple of vendors. If you want to add an entry with the vendor of your camera, the output of lsusb command will give you the vendor id, which is the first 4 digits of the ID field.

Dependencies

The Aravis library depends on libxml2 and glib2, with an optional USB support depending on libusb1, and an optional packet socket support depending on libaudit.

The GStreamer plugin depends on GStreamer1 in addition to the Aravis library dependencies.

The simple viewer depends on GStreamer1, Gtk+3, libnotify and the Aravis library dependencies.

The required versions are specified in the meson.build file in Aravis sources.

It is perfectly possible to only build the library, reducing the dependencies to the bare minimum.

Contributions

As an open source and free software project, we welcome any contributions to the aravis project: code, bug reports, testing...

However, contributions to both Gigabit Ethernet and USB3 protocol code (files src/arvuv*.[ch] src/arvgv*.[ch]) must not be based on the corresponding specification documents published by the AIA, as this organisation forbids the use of their documents for the development of an open source implementation of the specifications. So, if you want to contribute to this part of Aravis, don't use the AIA documents and state clearly in the pull request your work is not based on them.

Unit tests

Aravis has a set of unit tests that helps to catch regressions and memory leaks during the development. The test suite is run using the following commands:

ninja test

The is a small helper script that run the same tests under valgrind memmory checker

../tests/valgrind-memcheck

All the code is not covered yet by the tests. Code coverage can be obtained using:

meson configure -Db_coverage=true
ninja coverage

The report is published in build/meson-logs/coveragereport/index.html. Help on code coverage improvement is welcome.

Programming examples

While most of the API is documented, Aravis documentation lacks some good tutorial about the many features if offers. But a good resource is the tests directory inside Aravis sources, where you will find a numbers of small samples showing different key features.

Porting to Aravis 0.8

Aravis 0.8 has seen a major rewrite of how communication errors are handled. Instead of relying on a status API, each function that can fail has an additional error parameter now. This is the standard way of handling error in the glib ecosytem. The nice side effect is now errors throw exceptions in bindings where the language support them (rust, python, javascript).

A quick port from the older series to 0.8 series is just a matter of adding a NULL parameter to most of the modified functions. But you are advised to take this opportunity to correctly handle errors.

There is a page explaining Glib errors and how to manage them in the Glib documentation.

During the camera configuration, in C language it can be somehow cumbersome to check for errors at each function call. A convenient way to deal with this issue is the following construction:

GError **error = NULL;

if (!error) arv_camera_... (..., &error);
if (!error) arv_camera_... (..., &error);
if (!error) arv_camera_... (..., &error);
if (!error) arv_camera_... (..., &error);

if (error) {
	handle error here;
	g_clear_error (&error);
}

Downloads

Links

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