Diff of /src/auxiliary.h [000000] .. [413088]

Switch to unified view

a b/src/auxiliary.h
1
#include "Rcpp.h"
2
#include <opencv2/opencv.hpp>
3
#include "opencv2/xfeatures2d.hpp"
4
#include "opencv2/features2d.hpp"
5
#include "opencv2/shape/shape_transformer.hpp"
6
7
#ifndef AUXILIARY_H
8
#define AUXILIARY_H
9
10
////
11
// replace NAs in matrices
12
////
13
14
Rcpp::NumericMatrix replaceNaMatrix(Rcpp::NumericMatrix mat, int replace);
15
16
////
17
// Conversion
18
////
19
20
// cv::Mat vs Rcpp::RawVector(Image)
21
Rcpp::RawVector matToImage(cv::Mat mat);
22
cv::Mat imageToMat(Rcpp::RawVector image_data, int width, int height);
23
24
// cv::Mat vs Rcpp::NumericMatrix 
25
cv::Mat numericMatrixToMat(Rcpp::NumericMatrix nm);
26
Rcpp::NumericMatrix matToNumericMatrix(cv::Mat m);
27
28
// std::vector<cv::Point2f> vs Rcpp::NumericMatrix
29
std::vector<cv::Point2f> numericMatrixToPoint2f(Rcpp::NumericMatrix mat);
30
Rcpp::NumericMatrix point2fToNumericMatrix(std::vector<cv::Point2f> points);
31
  
32
// std::vector<cv::Point2f> vs cv::Mat
33
std::vector<cv::Point2f> matToPoint2f(cv::Mat mat);
34
cv::Mat point2fToMat(std::vector<cv::Point2f> points);
35
36
// std::vector<double> vs std::vector<cv::Point2f>
37
std::vector<double> KeyPointToDoubleVector(std::vector<cv::KeyPoint> points);
38
std::vector<double> Point2fToDoubleVector(std::vector<cv::Point2f> points);
39
  
40
////
41
// validation
42
////
43
  
44
// standard deviation
45
double cppSD(std::vector<cv::KeyPoint> points);
46
double cppSD(std::vector<cv::Point2f> points);
47
  
48
#endif