Project

General

Profile

Actions

action #2692

closed

speed up needle matching

Added by lnussel over 10 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
2014-07-10
Due date:
% Done:

100%

Estimated time:
(Total: 3.00 h)

Description

right now we walk through all areas in all needles and match each area one by one against the screenshot. We have to convert both the match area as well as the screenshot to opencv's internal format for every match. To speed this up all match areas could be collected and passed to the C++ opencv adapter at once so it only need to do the conversion once and one bulk result is returned.


Subtasks 1 (0 open1 closed)

action #2856: Makes the margin related with the needleResolvedaplanas2014-07-10

Actions
Actions #1

Updated by coolo over 10 years ago

the tinycv images are already read into the needle->{'img'} and even already extracted as area->{'img'} and this tinycv is an opencv structure. So there is nothing to gain here - we could cache some preprocessing, but it's really fast operations that do the thing

Actions #2

Updated by aplanas over 10 years ago

  • Assignee set to aplanas

Will check if there is room for improvement:

  • caching some operations (blur and color conversion)
  • matching smaller areas (crop the large image around the original area of the needle)
Actions #3

Updated by aplanas over 10 years ago

  • Status changed from New to In Progress

Initial optimization here: https://github.com/os-autoinst/os-autoinst/pull/77

This goes from ~0.15 +-0.02. per match to ~0.03 +-0.01

A better one is to put the full search() perl code in C++. I will address it now.

Actions #4

Updated by aplanas over 10 years ago

Use a linear model to extend the search area. https://github.com/os-autoinst/os-autoinst/pull/86

Actions #5

Updated by aplanas over 10 years ago

  • Status changed from In Progress to Resolved
Actions #6

Updated by okurz over 6 years ago

  • Target version changed from future to future
Actions

Also available in: Atom PDF