36 RobustKernelFactory* RobustKernelFactory::factoryInstance = 0;
38 RobustKernelFactory::RobustKernelFactory()
42 RobustKernelFactory::~RobustKernelFactory()
44 for (CreatorMap::iterator it = _creator.begin(); it != _creator.end(); ++it) {
52 if (factoryInstance == 0) {
56 return factoryInstance;
61 CreatorMap::const_iterator foundIt = _creator.find(tag);
62 if (foundIt != _creator.end()) {
63 cerr <<
"RobustKernelFactory WARNING: Overwriting robust kernel tag " << tag << endl;
70 void RobustKernelFactory::unregisterType(
const std::string& tag)
72 CreatorMap::iterator tagPosition = _creator.find(tag);
73 if (tagPosition != _creator.end()) {
76 _creator.erase(tagPosition);
80 RobustKernel* RobustKernelFactory::construct(
const std::string& tag)
const 82 CreatorMap::const_iterator foundIt = _creator.find(tag);
83 if (foundIt != _creator.end()) {
84 return foundIt->second->construct();
91 CreatorMap::const_iterator foundIt = _creator.find(tag);
92 if (foundIt != _creator.end()) {
93 return foundIt->second;
98 void RobustKernelFactory::fillKnownKernels(std::vector<std::string>&
types)
const 101 for (CreatorMap::const_iterator it = _creator.begin(); it != _creator.end(); ++it)
102 types.push_back(it->first);
105 void RobustKernelFactory::destroy()
107 delete factoryInstance;
stuff to open files and other unsorted components ProjectiveCamera types
Abstract interface for allocating a robust kernel.
create robust kernels based on their human readable name
base for all robust cost functions