An orchestrator for comparing two images using principial different algorithms.
:param settings: settings object, includes default and user's params
Source code in tools/comparer/img_comparer/img_comparer.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 | def __init__(self, settings: AppSettings):
"""
An orchestrator for comparing two images using principial different algorithms.
:param settings: settings object, includes default and user's params
"""
super().__init__()
self.settings = settings
self.method_mapping = {
Constants.dhash: DHash,
}
self.method = self.method_mapping[self.settings.method](
settings=self.settings,
)
self.logger = LoggerConfigurator.setup(
name=self.__class__.__name__,
log_path=Path(self.settings.log_path) / f"{self.__class__.__name__}.log" if self.settings.log_path else None,
log_level=self.settings.log_level
)
|