HOW TO ACQUIRE IMAGES FROM YOUR INDUSTRIAL CAMERA BY INSTALLING ARAVIS ON LINUX

How to install Aravis on Linux and acquire images from the machine vision camera

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 COMPUTER

To install Python and Pip, open the Linux terminal and enter the following lines:
 
$ sudo apt update
$ sudo apt install python3.8
$ sudo apt install python3-pip
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:
$ python3 --version
$ pip3 --version

STEP 2: INSTALL MESON AND NINJA

Install Meson and Ninja with Python using the following line:

$ pip3 install --user meson
$ pip3 install ninja

The basic requirements are now installed.

STEP 3: INSTALL THE LATEST VERSION OF ARAVIS

To 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:
$ sudo apt install libxml2-dev libglib2.0-dev cmake libusb-1.0-0-dev gobject-introspection \
                 libgtk-3-dev gtk-doc-tools  xsltproc libgstreamer1.0-dev \
                 libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev \
                 libgirepository1.0-dev

Optional: For color vision cameras, additional plugins for “gstreamer” are needed:
$ sudo apt-get install gstreamer1.0-plugins-bad

 

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:

$ pip3 install --user gi-docgen

Now we are ready to build Aravis. Use the following commands to build Aravis:

$ meson build
$ cd build
$ sudo ninja
$ sudo ninja install

Copy the “aravis.rules” file to the Linux device manager “udev: etc/udev/rules.d” using the following line: 
$ sudo cp ~/Path/to/your/Aravis/src/aravis.rules /etc/udev/rules.d

Reboot your computer to complete the installation. After restarting your computer, navigate your Linux terminal to the viewer and start the program.
~/Path/to/your/Aravis/build/viewer$ ./arv-viewer-X.X

Connect your camera and click on the reload button. You should now see the name of your connected 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 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 cameras, you have to configure the IP settings first, just like you would with GalaxyView. After the IP is configured, the GigE 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.

Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
January,February,March,April,May,June,July,August,September,October,November,December
Not enough items available. Only [max] left.
Add to WishlistBrowse WishlistRemove Wishlist
Shopping cart

Your cart is empty.

Return To Shop

Add Order Note Edit Order Note
Estimate Shipping
Add A Coupon

Estimate Shipping

Add A Coupon

Coupon code will work on checkout page