3#include "../_cexports/c_polimago.h"
5#include "../global.hpp"
6#include "predictor_factory_base.hpp"
7#include "classification_predictor.hpp"
8#include "classification_test_result.hpp"
9#include "../minos/training_set.hpp"
10#include "../sample_database/sample_classification_image_list.hpp"
32 return CExports::CU_ClassifyOneVersusAll;
34 return CExports::CU_ClassifyOneVersusOne;
43 case CExports::CU_ClassifyOneVersusAll:
45 case CExports::CU_ClassifyOneVersusOne:
65 usage_(Private::ToClassifierUsageType(usageType))
82 return Private::ToClassificationType(usage_);
92 usage_ = Private::ToClassifierUsageType(usage);
103 PredictorFactoryBaseEx::UseSettingsFromPredictor (clf);
115 PredictorFactoryBaseEx::UseSettingsFromTestResult (res);
128 return Internal::DoResCallObjectOut<ClassificatioPredictor>([&](
void* & res)
130 return CVB_CALL_CAPI(PMTrainClassifierFromSil(sil.
Handle(), ..., usage_, preproCode_, featureResolution_, lambda_, interpolation_ ==
InterpolationType::Linear, res);
143 return Internal::DoResCallObjectOut<ClassificatioPredictor>([&](
void* & res)
145 return CVB_CALL_CAPI(PMTrainClassifierFromMts(sil.
Handle(), ..., usage_, preproCode_, featureResolution_, lambda_, interpolation_ ==
InterpolationType::Linear, res);
151 CExports::TClassifierUsage usage_;
A Minos Training Set from which a classifier can be generated.
Definition: training_set.hpp:1151
Predictor to classify patterns with.
Definition: classification_predictor.hpp:45
ClassificationType Classification() const
The classification type for which this classifier has been generated.
Definition: classification_predictor.hpp:150
Classification test result object.
Definition: classification_test_result.hpp:27
Predictor factory for classification predictor.
Definition: classification_predictor_factory.hpp:56
void SetUsage(ClassificationType usage)
Sets the type of classification for which to generate the predictor.
Definition: classification_predictor_factory.hpp:90
ClassificationType Usage() const noexcept
Gets the type of classification for which to generate the predictor.
Definition: classification_predictor_factory.hpp:80
ClassificationPredictorFactory(ClassificationType usageType)
Constructor.
Definition: classification_predictor_factory.hpp:63
void UseSettingsFromPredictor(const ClassificationPredictor &clf)
Copy the predictor generation settings from a predictor.
Definition: classification_predictor_factory.hpp:101
void UseSettingsFromTestResult(const ClassificationTestResult &res)
Copy the predictor generation settings from a test result.
Definition: classification_predictor_factory.hpp:113
Base class for classifier factory classes.
Definition: predictor_factory_base.hpp:178
Classifier type that operates on images.
Definition: decl_classification_sil.hpp:204
void * Handle() const noexcept
Classic API SIL handle.
Definition: sample_list.hpp:403
ClassificationType
Determine the classification type to be carried out.
Definition: classification_predictor.hpp:32
@ OneVersusAll
Quick classification, that tests versus all classes simultaneously (but potentially at the cost of re...
@ OneVersusOne
Thorough classification, that tests all possible pairs of classes (which yields potentially better re...
@ Linear
Image data is (if necessary) extracted with linear interpolation.
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24