How to acquire images from your industrial camera by installing Aravis on Linux
Aravis is a machine vision software kit developed to use multiple machine vision cameras simultaneously, regardless of the manufacturer. It is an object based vision library, originally created for Linux, to control and acquire images from digital industrial cameras, and comes with a basic viewer interface. In this article, we will describe how to install Aravis on Linux using Python and start acquiring images from your industrial camera.
Step 1: Install Python and Pip on your Linux computerTo install Python and Pip, open the Linux terminal and enter the following lines:
Select a Python version that is compatible with your Linux distribution, such as Python 3.8. Then, check if Python and Pip are installed on your Linux computer using the following lines:
Step 2: Install Meson and Ninja on your Linux computer
Install Meson and Ninja with Python using the following line:
The basic requirements are now installed.
Step 3: Install the latest version of Aravis on your Linux computerTo install Aravis from the source, download the latest release from https://github.com/AravisProject/aravis/releases. As there is only one version available for Linux, Windows, and Mac, we can build Aravis from the source. However, before building Aravis, we need to install the dependencies. You can find the detailed list of dependencies in the “meson.build” file.
To install most of the needed dependencies, you can use the following command:
Optional: For color machine vision cameras, additional plugins for “gstreamer” are needed:
Follow the Linux tutorial on their website: Installing | CMake.
Before building Aravis, you need to install the newest version of “cmake” and “gi-docgen” using the following lines:
Now we are ready to build Aravis. Use the following commands to build Aravis:
Copy the “aravis.rules” file to the Linux device manager “udev: etc/udev/rules.d” using the following line:
Reboot your computer to complete the installation. After restarting your computer, navigate your Linux terminal to the viewer and start the program.
Connect your machine vision camera and click on the reload button. You should now see the name of your connected machine vision camera and its serial number. Click your camera and press the play button to start the acquisition. You should now get a live feed from the selected machine vision camera.
(Tested on Linux Ubuntu 20.04, with a MER-160-227U3M-L machine vision camera)
The Aravis viewer works for both our USB3 and our GigE cameras. For the GigE machine vision cameras, you have to configure the IP settings first, just like you would with GalaxyView. After the IP is configured, the GigE machine vision cameras will work with the Aravis viewer.
Do you need technical support?
If you followed these steps but did not receive the result you were looking for, please contact our technical support staff! One of our vision engineers will answer your question within 24hrs. Do you have other technical questions regarding machine vision? If so, visit our machine vision knowledge center. We upload new technical articles regularly.
If you want to stay up-to-date with our vision articles, follow our page on LinkedIn. We post every new article after its release.