SourceXtractorPlusPlus  0.10
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CompactModelBase.h
Go to the documentation of this file.
1 /*
2  * CompactModelBase.h
3  *
4  * Created on: Aug 19, 2019
5  * Author: mschefer
6  */
7 
8 #ifndef _MODELFITTING_MODELS_COMPACTMODELBASE_H_
9 #define _MODELFITTING_MODELS_COMPACTMODELBASE_H_
10 
13 
14 #include "SEUtils/Mat22.h"
15 
16 namespace ModelFitting {
17 
18 using SExtractor::Mat22;
19 
20 template <typename ImageType>
21 class CompactModelBase : public ExtendedModel<ImageType> {
22 
23 public:
28 
29  virtual ~CompactModelBase() = default;
30 
31 protected:
33 
34  template<typename ModelEvaluator>
35  float samplePixel(const ModelEvaluator& model_eval, int x, int y, unsigned int subsampling) const;
36 
37  template<typename ModelEvaluator>
38  float adaptiveSamplePixel(const ModelEvaluator& model_eval, int x, int y, unsigned int max_subsampling, float threshold=1.1) const;
39 
40  // Jacobian transform
43 
44 private:
48 };
49 
50 }
51 
53 
54 
55 #endif /* _MODELFITTING_MODELS_COMPACTMODELBASE_H_ */
float samplePixel(const ModelEvaluator &model_eval, int x, int y, unsigned int subsampling) const
std::shared_ptr< BasicParameter > m_x_scale
std::shared_ptr< BasicParameter > m_rotation
Mat22 getCombinedTransform(double pixel_scale) const
float adaptiveSamplePixel(const ModelEvaluator &model_eval, int x, int y, unsigned int max_subsampling, float threshold=1.1) const
std::shared_ptr< BasicParameter > m_y_scale
virtual ~CompactModelBase()=default
const double pixel_scale
Definition: TestImage.cpp:75
std::pair< double, double > transform(int x, int y, const std::array< double, 4 > &t)
CompactModelBase(std::shared_ptr< BasicParameter > x_scale, std::shared_ptr< BasicParameter > y_scale, std::shared_ptr< BasicParameter > rotation, double width, double height, std::shared_ptr< BasicParameter > x, std::shared_ptr< BasicParameter > y, std::tuple< double, double, double, double > transform)