Giter Site home page Giter Site logo

maksymt17 / aquamarine Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 185.39 MB

Object recognition tool

Home Page: https://github.com/MaksymT17/aquamarine

License: GNU Affero General Public License v3.0

CMake 19.38% C++ 77.54% Shell 1.27% Python 1.19% Go 0.33% Dockerfile 0.29%
recognition algorithms image-processing detection movement-detection c-plus-plus cross-platform bfs-algorithm cplusplus-14 bmp-image

aquamarine's People

Contributors

maksymt17 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

aquamarine's Issues

Add Object class

add Object class with possibility to check around if this object connected to other one

Remove virtual destrcutor in common Matrix class declaration

Remove virtual destructor for Matrix class

To Reproduce
Steps to reproduce the behavior:

  1. Go to Matrix class definition checkout declaration of special member functions

Additional context
Such virtual destruction make a negative impact on execution time,

  1. no needs certain case to define virtual destructor
  2. virtual makes additional vtable for that frequently used class

Add new logger

Logger needs to be added to make it possible slightly debug program execution.
Variadiac arguments have to be used, logs should be parametrized.

Add Configuration

parameters:
AffinityThreshold
MinPixelsForObject
PixelStep;
CalculationTimeLimit
IdleTimeout

Add time limitation for algorithms

Add time limitation for algorithms:
No needs to proceed calculations if result can not be provided in time.

If time exceeded - user should be notified about possible noise in images - comparison results can be distorted.

Resolution:
change input parameters: affinity threshold and min count of pixels in object,
or provide other image with reduced 'noise'.

Add interface for movements detection

should provide results of movement for every potential object
search of movement should be done only for objects not whole image
optionally can be added check for checking whole image

Add threads multiplier to config file

Threads count has to be added in config file, to make possibility adjust speed of processing images

Describe the solution you'd like
In case of HW specific such threads multiplier can significantly improve overall results of processing.
In meantime wrong multiplier can also provide loss of objects, especially with conjunction of small Calculation_Time_Limit value.

Describe alternatives you've considered
Add parameter to config file, set value as default to 2.0

Additional context
Explanation can be added on aquamarine wiki page

Add ordering of collected objects

During searching objects keep some order - Ascending/Descending type.
Will be used during handling results. If user interested in biggest objects - they will be collected in needed order: biggest -first, smallest - last.

[Technical]:
std::set can be used where comparator will be selected, based on 'value'-weight of objects.

[Purpose]:
User can get results of more interested objects(usually - bigger)

[Warning]:
Can be timecostly if a lot of objects found.

[Flexibility]
Can be configurable: up to user requirements. When user can define if ordereing important, if not - can be used simple vector of objects as it was before

add simple ImageDrawer

Is your feature request related to a problem? Please describe.
Create Bmp image drawer

Describe the solution you'd like
Can be used existing bmp_reader from third_party

Describe alternatives you've considered
as option different libraries will be nice, especially with direct access from taken picture, closer to driver for faster extraction

Additional context
drawRect should exisist to make vision to user where object/movement detected

Fix UT for new approach with selecting rows to calculations

UTs are failing because of selection Row instead of a column,
UT doesn't updated regarding Row segment selection per thread

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

[AM-43] Add UT coverage report generation

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Make the possibility to generate a report about how UTs are covered sources

POC prepare tool usage for RAW file convertion to RGB bytes

can be used some external tool or script
or c++ code with extraction

requirements:
fast convertion, JPEG data extraction.

optionally:
will be a plus to use low level access to memory,
maybe manufacturers can provide some SDK, for extraction pixels data from internal photo camera picture buffer

opened external discussion:
stackoverflow question

replace bit shiftings wit bitset

remove oldschool bit shifts, and use std::bitset<> instead.
Make code more readable and use modern types defined already in standard.

Add UT

Needed set of Unit Tests which will check expected results after comparison/reading/searching

ThresholdDiffChecker crash occurs with some threads count

Check how ThresholdDiffChecker::getThresholdDiff works with different numbers of threads,
Priority is low for that moment as this class doesn't impact Object/Movement detection

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Create UT base class

with supporting basic support of prvided statements:

EQUAL
EXPECT_TRUE/FALSE
EXPECT_THROW

simplified alternative of gtest

Bug with last thread collecting objects

Describe the bug
Fix problem with missed results from last thread

To Reproduce
Steps to reproduce the behavior:

  1. use multhithreaded CPU
  2. launch aquamarine comparison , where object will be in very right side of image
  3. Check results(debuggin or output bitmap with BitmapDrawer)

Expected behavior
last thread executed objects collected, but not added in final list.

Multithreading in Bmp image data extraction

Multithreading in Bmp image data extraction, have to be implemented to speed-up execution of current functionality.
Currently Extraction data from QHD image takes more then second, its inappropriate.
Multithreading + optimisations have to be added.

Add ThreadPool suppport

Type of optimization:
[Extraction/Analyze/Build&Compile/Cross-platform]

Description:
Add ThreadPool with conditional variables

Movement detector class implementation

MovementDetector shall check whether Objects moved on pair of images provided.
User should set objects which he interested in then check of movement can be started.
After checking what changes with should be provided possibility to recieve updated list of objects.

fix wrong merging of objects between threads results

fix wrong merging of objects between threads results

To Reproduce
Steps to reproduce the behavior:

  1. Compare image with movable objects (rs_1 rs_2)
  2. Use multhithreading with 8 or more threads

Expected behavior
Merge objects if there are connected

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
Linux/ Windows OS

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Change image segments from columns to rows

Type of optimization:
Analyze
[Extraction/Analyze/Build&Compile/Cross-platform]

Description:
Modify existing implementation for multithreaded calculations and improve CPU cache utilization.
An update of the aquamarine wiki page is also required.

replace std::vector for matrix to 2d vector

Type of optimization:
Extraction:
replace std::vector<> inside of matrix to vector<vector>

Description:
as Matrix is representation of image and related pixels, better to use 2 matrix instead of current vector.
Why:
Avoid unnecessary row index calculation all time due access to matrix values

Exception due calculation on rs_1 rs_2 image-samples [Windows]

Exception thrown
"std::vector out of range"

To Reproduce
Steps to reproduce the behavior:

  1. compare rs_1 and rs_2 bmp images
  2. Windows compiler required(issues visible under VIsualStudio)
  3. Config MinPixels: 5, step: 2, Calculation_Time_Limit: 500
  4. See error

Expected behavior
Calculation has to be finished without exception

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • Windows OS

Additional context
index is going out of thread column limits

AM-50 Add database storage for all results

While Aquamarine has been making comparisons results could be saved into the database file.
Then after multiple runs, all results could be checked apart from logging.

SQLite3 could be used as a database.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.