SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SegmentationFactory.cpp
Go to the documentation of this file.
1
23#include <iostream>
24
25#include "Configuration/ConfigManager.h"
26
30
35
36#ifdef WITH_ML_SEGMENTATION
38#endif
39
41
42using namespace Euclid::Configuration;
43
44namespace SourceXtractor {
45
47 : m_algorithm(SegmentationConfig::Algorithm::UNKNOWN),
48 m_task_provider(task_provider), m_lutz_window_size(0), m_bfs_max_delta(0), m_ml_threshold(0.) {
49}
50
55
57 auto segmentation_config = manager.getConfiguration<SegmentationConfig>();
58 m_algorithm = segmentation_config.getAlgorithmOption();
59 m_filter = segmentation_config.getFilter();
60 m_lutz_window_size = segmentation_config.getLutzWindowSize();
61 m_bfs_max_delta = segmentation_config.getBfsMaxDelta();
62 m_model_path = segmentation_config.getOnnxModelPath();
63 m_ml_threshold = segmentation_config.getMLThreashold();
64
65 auto assoc_config = manager.getConfiguration<AssocModeConfig>();
66 m_catalogs = assoc_config.getCatalogs();
67}
68
100
101} // SEImplementation namespace
Implements a Segmentation based on CNN.
Implements a Segmentation based on the BFS algorithm.
Implements a Segmentation based on CNN.
Used to select a Segmentation algorithm.
void reportConfigDependencies(Euclid::Configuration::ConfigManager &manager) const override
Registers all the Configuration dependencies.
std::shared_ptr< DetectionImageFrame::ImageFilter > m_filter
void configure(Euclid::Configuration::ConfigManager &manager) override
Method which should initialize the object.
std::vector< std::vector< AssocModeConfig::CatalogEntry > > m_catalogs
std::shared_ptr< TaskProvider > m_task_provider
std::shared_ptr< Segmentation > createSegmentation() const
SegmentationFactory(std::shared_ptr< TaskProvider > task_provider)
Constructor.
SegmentationConfig::Algorithm m_algorithm