Skip to content

Details of build and implementation

Max edited this page Jul 6, 2024 · 1 revision

How to build sources and run the program:

Ubuntu:

apt-get -y install git g++ cmake python3 valgrind gcovr libsqlite3-dev

git clone https://github.com/MaksymT17/aquamarine.git

UT: gcovr library used to generate the code coverage report. 'prepare_build.sh' and 'make_and_run_tests.sh' will generate report.

When packages are installed just run one of scripts 'build.sh' or 'rebuild_and_run.sh', to build binary or to build binary and run test with comparison. Docker containers could simplify the development process.

Caution:

I complied and tested with g++ 11.2.0 and several other compilers including Microsoft Visual C++ (MSVC). Valgrind checks show that at least basic scenario doesn't have mem leaks or other issues. I find compilation warnings under different compilers and fixed them(at least what I have seen), in similar or in more specific cases please report me, or feel free to contribute.

Components, sub-folders description:

Extraction data of pixels(RGB channels, currently Alpha channel not required), as a result of reading - will be fulfilled Matrix with RGB values. Currently used bmp_reader as an open library to reading BMP images. For simple representation and highlighting objects on the image - added specified class which can draw object bounds as rectangle area over an input BMP image.

Common types and definitions, which shared between components(constants/structs/classes/templates/functions)

Set of Comparison classes, which responsible to identify the difference between images, and store it in the appropriate form(currently: matrix).

Asynchronous calls are in use for reducing load available CPU cores/threads. Multithreading needed in different forms, for example when recognitions between images started, at the same time extraction of data for next image - also can be performed, in the case for example "Detection of movement" where pattern requires to check set of images, more than 2.

External open libraries that can help in implementation of all desired features.

Minimal collection of files needed for starting comparison with images: a set of image samples in BMP format, a configuration file. Images provided with different resolutions from 10x10 pixels up to QHD samples, to make possible to debug and check how algorithms are working. The configuration has to be changed depending on test purposes or real recognition.

Warning: in case of inappropriate configuration parameters, calculations/recognition can be incomplete or too long. The user has to specify parameters in the range that are applicable to his expectations(especially time-related constants). Planned integration of AI, for runtime parameter adjustments, to improve accuracy with applying timing requirements provided by the user.

More details can be found at wiki page