Installation and Usage of the Regula Document Reader on Linux

Summary

This article describes the way to compile and launch the Regula Document Reader demo application using CMake and Qt.

Requirements

  • Linux OS (Debian, Ubuntu, RHEL)
  • Administrator privileges (sudo)
  • Internet connection to install packages

Steps

  1. Install the developer package:

    sudo apt-get install regula-reader-dev    # For Debian-based (Ubuntu)
    sudo yum install regula-reader-dev        # For RHEL derivatives (AlmaLinux, Rocky Linux)
  2. Install compiler (GCC C++ or LLVM Clang):

    sudo apt install g++        # For Debian-based (Ubuntu)
    sudo yum install gcc-c++    # For RHEL derivatives (AlmaLinux, Rocky Linux)

    or

    sudo apt install clang     # For Debian-based (Ubuntu)
    sudo yum install clang     # For RHEL derivatives (AlmaLinux, Rocky Linux)
  3. Install prerequisites:

    sudo apt install cmake pkg-config qtbase5-dev      # For Debian-based (Ubuntu)
    sudo yum install cmake pkgconf qt5-qtbase-devel    # For RHEL derivatives (AlmaLinux, Rocky Linux)
  4. Navigate to the sources directory (NOTE: the default user and group for /usr/share/regula is root, and default permissions do not allow reading the contents of this folder, so change permissions (sudo chmod -R a+r /usr/share/regula) or open su terminal):

    cd /usr/share/regula/Examples/RegulaDocumentReader-src
  5. Configure the project:

    cmake -DCMAKE_BUILD_TYPE=Release -S /usr/share/regula/Examples/RegulaDocumentReader-src -B <BUILD_PATH>
  6. Build the project:

    cmake --build <BUILD_PATH>
  7. Copy necessary libs:

    cp /usr/lib/regula/sdk/* <BUILD_PATH>
  8. Run the demo application:

    cd <BUILD_PATH>
    ./RegulaDocumentReader
  9. Click Connect to connect the reader:

    Main screen not connected

Verification

  • The application launches without errors.
  • The reader connects after clicking Connect.
  • Place a document and click Process:

    Process button in application

  • You will see the document image and RFID binary result:

    Full light document image RFID binary result

Common errors

  • Application is unresponsive when connecting → Ensure there are no foreign objects in the reader’s scan area. Click Wait:

    Application frozen at connection

  • Qt is not found by CMake → Manually specify the Qt path using -DCMAKE_PREFIX_PATH:

    cmake -S ... -DCMAKE_PREFIX_PATH=/opt/Qt/5.15.2/gcc_64
Was this article helpful?
0 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.

Articles in this section

See more