RU | EN

Document Scanner

Description

Document Scanner is an application for scanning and processing documents using a smartphone camera. It allows you to set document boundaries, automatically adjusts perspective, improves image quality, and allows you to save the result in a new document.

The application is developed in C++ and QML using the OpenCV library for processing images taken from the camera. The project provides an example of using video filters to search for documents using computer vision technology. The functionality of the application is to scan a document using a smartphone camera, determine the boundaries with the possibility of manual correction and save all scanned pages into a single pdf file with automatic perspective adjustment. It is also possible to create drafts and edit the borders of previously added pages. The following APIs are used:

  • Basic APIs: Libauroraapp, Qt5Core, Qt5Qml, Qt5Quick, Qt5Concurrent, Qt5Gui.
  • Graphics: Qt5OpenGL.
  • System functions: Qt5DBus, QML Notifications plugin.
  • Multimedia: Qt5Multimedia.
  • Working with data: Qt SQL. Non-system libraries used: OpenCV, protobuf.

Build Status

  1. example - pipeline status
  2. dev - pipeline status

Table of Contents

  1. Compatibility
  2. Build Features
  3. Branches Info
  4. Install and Run
  5. Screenshots
  6. Use Cases
  7. Project Structure
  8. Terms of Use and Participation

Compatibility

The project is compatible with current versions of the Aurora OS.

Build Features

The project is built in the usual way using the Aurora SDK.

To build the project it needs to increase the Build Engine virtual machine RAM. It is required to allocate 500 MB RAM to the virtual machine for each processor core. For example, if Build Engine has 4 processor cores, then its RAM must be at least 2000 MB.

To build OpenCV library it uses CMake. The Cmake running configuration is described inside the ru.auroraos.DocumentScanner.spec file. The shared libraries and some include files of OpenCV library will be built into the <build-project-dir>/opencv directory. Some include files of OpenCV library can be found in opencv source directory. The shared libraries files of OpenCV library will be installed into the /usr/share/ru.auroraos.DocumentScanner/lib/ directory on the Aurora OS device.

Branches Info

Branches

Install and Run

The application is installed and launched according to the instructions Example's build.

The application needs to have permissions for Camera and Documents to work. These permissions are set in the .desktop file.

Screenshots

screenshots

Use Cases

The application has the following use cases:

  1. Photographing the pages of the document,
  2. Manually adjusting the borders of a scanned document,
  3. Changing the document name, page size, and DPI resolution,
  4. Saving the scanned document to mobile device files or drafts,
  5. Saving, editing, or deleting a previously created draft document.

Project Structure

The project has a standard structure of an application based on C++ and QML for Aurora OS.

app subproject contains the application source code:

  • app.pro file describes the app subproject structure for the qmake build system.
  • icons directory contains the application icons for different screen resolutions.
  • qml directory contains the QML source code and the UI resources.
    • cover directory contains the application cover implementations.
    • icons directory contains the additional custom UI icons.
    • pages directory contains the application pages.
    • DocumentScanner.qml file provides the application window implementation.
  • src directory contains the C++ source code.
    • main.cpp file is the application entry point.
  • translations directory contains the UI translation files.
  • ru.auroraos.DocumentScanner.desktop file defines the display and parameters for launching the application.
  • opencv directory is a git submodule with OpenCV 4.7.0.
  • ru.auroraos.DocumentScanner.pro file describes the project structure for the qmake build system.
  • rpm directory contains the rpm-package build settings.

Terms of Use and Participation

The source code of the project is provided under the license, which allows its use in third-party applications.

Contributor License Agreement

The contributor agreement documents the rights granted by contributors of the Open Mobile Platform.

Information about the contributors is specified in the AUTHORS file.

Code of conduct is a current set of rules of the Open Mobile Platform which informs you how we expect the members of the community will interact while contributing and communicating.