SourceXtractorPlusPlus  0.12
Please provide a description of the project.
OpenCvDataVsModelInputTraits.h
Go to the documentation of this file.
1 
23 #ifndef MODELFITTING_OPENCVDATAVSMODELINPUTTRAITS_H
24 #define MODELFITTING_OPENCVDATAVSMODELINPUTTRAITS_H
25 
26 #include <utility>
27 #include <opencv2/opencv.hpp>
29 
30 namespace ModelFitting {
31 
32 template <>
33 struct DataVsModelInputTraits<cv::Mat> {
34 
35  using iterator = decltype(std::declval<cv::Mat>().begin<double>());
36 
37  static iterator begin(cv::Mat& input) {
38  return input.begin<double>();
39  }
40 
41  static iterator end(cv::Mat& input) {
42  return input.end<double>();
43  }
44 
45  static size_t size(const cv::Mat& input) {
46  return input.cols * input.rows;
47  }
48 
49 };
50 
51 } // end of namespace ModelFitting
52 
53 #endif /* MODELFITTING_OPENCVDATAVSMODELINPUTTRAITS_H */
54 
Traits class the DataVsModelResiduals class uses for accessing its inputs.
decltype(std::declval< cv::Mat >().begin< double >()) iterator