Skip to content

Tidaly-IO/tidaly-image-processing

Repository files navigation

Tidaly Image Processing

This module will allow the parsing of an image to obtain a value.

By feeding an image or a series of images as an input the module will go trough multiple steps and extract a numerical value from the image using OCR.

Organisation

  • main branch should never be pushed to, it is the main branch of the project and should only be merged by hotfixes or develop
  • develop is the development branch of the project, all new features and fixes should be merged onto it.

Requirements

  • C++20+
  • CMake 3.15+
  • Python 3.9+

Dependencies

You do not need to install these, CMake handles it for you.

❗❗❗ OpenCV Requirements ❗❗❗ You need to install these

OpenCV requires some basic image and optimization libraries, most of these come pre-packaged on most OSs, though some might be missing.

Please run ./bin/check_dependencies.sh, this will quickly check that you have the necessary libraries to run the program.

If any warning comes up, make sure you have installed the libraries and they are accessible in your $PATH before going any further.

Objective

This module will then be mounted onto a motherboard (Raspberry, Arduino, custom...) as we don't yet know which one we will use, it is in our interest to abstract this process as best as possible.

C++ has been chosen for it's speed and efficiency. OCR being a pretty greedy process (AI model + image processing), we need to make sure that it is as fast and efficient as possible.

Installation

Running the build tool will handle everything, fetch dependencies using Conan, build and compile the project.

./bin/build.sh [TYPE] [VENV]

# [TYPE] can be:
# - Release (default)
# - Debug
# - Tests (builds the tests)

# [VENV] is `True` by default, if you want the build process to use and install on your host turn this off

Usage

For a complete list of options, run:

./build/imageProcessing -h

You can communicate with the service that is now running in the background, via FIFO:

echo "/path/to/image.jpg" > /tmp/tidaly-ocr-fifo

In case you want to stop this service, you can send .close instead of an image path

Testing

./build/imageProcessing_test

A tool has been setup to aid in testing and coverage generation (this has some extra requirements like lcov, and genhtml, feel free to use your own tools):

./bin/build.sh tests

About

Given an image of water meter extracts the consumption // PaddleOCR + OpenCV

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •