SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
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
30namespace ModelFitting {
31
32template <>
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
decltype(std::declval< cv::Mat >().begin< double >()) iterator
Traits class the DataVsModelResiduals class uses for accessing its inputs.