EUTAFT Manuals: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
No edit summary
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Building the Vision GUI==
==[[EUTAFT_Manuals#Install_instructions|Install instructions]]==
 
===Building the Vision GUI===
In order to build the Vision GUI, you need to install qtcreator, the opencv libraries, and the Basler pylon software.
In order to build the Vision GUI, you need to install qtcreator, the opencv libraries, and the Basler pylon software.
 
#To install Qt Creator, run the following command: <pre>sudo apt-get install qtcreator</pre>
To install Qt Creator, run the following command though the terminal:
#To install the OpenCV libraries, I recommend installing OpenCV from source. The steps you need to take to do this are described in the following tutorial: [https://linuxize.com/post/how-to-install-opencv-on-ubuntu-18-04/ How to install OpenCV on Ubuntu 18.04]. Currently, opencv3.4.8 is used. Alternatively, you can install OpenCV from the Ubuntu repository. First refresh the packages index: <pre>sudo apt update</pre> Then, install the OpenCV package: <pre>sudo apt install python3-opencv</pre> Note however that the second method does not specify the version to be installed.
<blockquote><code>sudo apt-get install qtcreator </code></blockquote>
#To install the Basler pylon software, download it from the [https://www.baslerweb.com/en/sales-support/downloads/software-downloads/ Basler Software Downloads site]. The pylon version currently used is [https://www.baslerweb.com/en/sales-support/downloads/software-downloads/pylon-5-2-0-linux-x86-64-bit/ Version 5.2.0]. Extract the downloaded ''tar'' file to your home directory, and change to the extracted pylon directory, e.g.: <pre>cd ~/pylon-5.2.0.13457-x86_64</pre> Extract the corresponding SDK into <code>/opt</code>: <pre>sudo tar -C /opt -xzf pylonSDK*.tar.gz</pre> Install udev-rules to set up permissions for Basler USB cameras: <pre>./setup-usb.sh</pre> Unplug and replug all USB cameras to get the udev rules applied. To test or parametrize the camera, start the Basler pylon Viewer program: <pre>/opt/pylon5/bin/PylonViewerApp</pre>
 
#To build the GUI, open the project (so the ''.pro'' file) in Qt Creator, and press <code>ctrl+B</code>. If it fails to build, make sure the opencv and pylon libraries and their respective paths are specified correctly in the ''Qtvision.pro'' file. So check what is behind: <pre>LIBS += ...</pre> and: <pre>INCLUDEPATH += ...</pre> If that seems fine and it still doesn't build, you might need to install missing libraries using: <pre>apt-get</pre>
To install the OpenCV libraries, follow the steps under the "Install OpenCV from Source" paragraph in the following link: [https://linuxize.com/post/how-to-install-opencv-on-ubuntu-18-04/ How to install OpenCV on Ubuntu 18.04]. At the time of programming Vision GUI 2019, opencv3.4.8 was installed.
 
To install the Basler pylon software, download it from the [https://www.baslerweb.com/en/sales-support/downloads/software-downloads/ Basler Software Downloads site]. The pylon version currently used is [https://www.baslerweb.com/en/sales-support/downloads/software-downloads/pylon-5-2-0-linux-x86-32-bit/ Version5.2.0].
 
To build the GUI press <code>ctrl+B</code>. If it fails to build, make sure the opencv and pylon libraries <code>LIBS +=</code> and their respective paths <code>INCLUDEPATH +=</code> are specified in the ''Qtvision.pro'' file. If they are specified, install missing libraries using <code>apt-get>.

Latest revision as of 18:12, 3 December 2019

Install instructions

Building the Vision GUI

In order to build the Vision GUI, you need to install qtcreator, the opencv libraries, and the Basler pylon software.

  1. To install Qt Creator, run the following command:
    sudo apt-get install qtcreator
  2. To install the OpenCV libraries, I recommend installing OpenCV from source. The steps you need to take to do this are described in the following tutorial: How to install OpenCV on Ubuntu 18.04. Currently, opencv3.4.8 is used. Alternatively, you can install OpenCV from the Ubuntu repository. First refresh the packages index:
    sudo apt update
    Then, install the OpenCV package:
    sudo apt install python3-opencv
    Note however that the second method does not specify the version to be installed.
  3. To install the Basler pylon software, download it from the Basler Software Downloads site. The pylon version currently used is Version 5.2.0. Extract the downloaded tar file to your home directory, and change to the extracted pylon directory, e.g.:
    cd ~/pylon-5.2.0.13457-x86_64
    Extract the corresponding SDK into /opt:
    sudo tar -C /opt -xzf pylonSDK*.tar.gz
    Install udev-rules to set up permissions for Basler USB cameras:
    ./setup-usb.sh
    Unplug and replug all USB cameras to get the udev rules applied. To test or parametrize the camera, start the Basler pylon Viewer program:
    /opt/pylon5/bin/PylonViewerApp
  4. To build the GUI, open the project (so the .pro file) in Qt Creator, and press ctrl+B. If it fails to build, make sure the opencv and pylon libraries and their respective paths are specified correctly in the Qtvision.pro file. So check what is behind:
    LIBS += ...
    and:
    INCLUDEPATH += ...
    If that seems fine and it still doesn't build, you might need to install missing libraries using:
    apt-get