This repository has been archived by the owner on Jan 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 319
/
mexopencv_shape.hpp
136 lines (118 loc) · 5.48 KB
/
mexopencv_shape.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/**
* @file mexopencv_shape.hpp
* @brief Common definitions for the shape module
* @ingroup shape
* @author Amro
* @date 2015
*
* Header file for MEX-functions that use shape module from OpenCV library.
* This file includes maps for option processing, as well as functions for
* creating instances of classes from parsed arguments.
*/
#ifndef MEXOPENCV_SHAPE_HPP
#define MEXOPENCV_SHAPE_HPP
#include "mexopencv.hpp"
#include "opencv2/shape.hpp"
// ==================== XXX ====================
/** Convert a HistogramCostExtractor to MxArray
* @param p smart poitner to an instance of HistogramCostExtractor
* @return output MxArray structure
*/
MxArray toStruct(cv::Ptr<cv::HistogramCostExtractor> p);
/** Convert a ShapeTransformer to MxArray
* @param p smart poitner to an instance of ShapeTransformer
* @return output MxArray structure
*/
MxArray toStruct(cv::Ptr<cv::ShapeTransformer> p);
// ==================== XXX ====================
/** Create an instance of NormHistogramCostExtractor using options in arguments
* @param first iterator at the beginning of the vector range
* @param last iterator at the end of the vector range
* @return smart pointer to created HistogramCostExtractor
*/
cv::Ptr<cv::HistogramCostExtractor> create_NormHistogramCostExtractor(
std::vector<MxArray>::const_iterator first,
std::vector<MxArray>::const_iterator last);
/** Create an instance of EMDHistogramCostExtractor using options in arguments
* @param first iterator at the beginning of the vector range
* @param last iterator at the end of the vector range
* @return smart pointer to created HistogramCostExtractor
*/
cv::Ptr<cv::HistogramCostExtractor> create_EMDHistogramCostExtractor(
std::vector<MxArray>::const_iterator first,
std::vector<MxArray>::const_iterator last);
/** Create an instance of ChiHistogramCostExtractor using options in arguments
* @param first iterator at the beginning of the vector range
* @param last iterator at the end of the vector range
* @return smart pointer to created HistogramCostExtractor
*/
cv::Ptr<cv::HistogramCostExtractor> create_ChiHistogramCostExtractor(
std::vector<MxArray>::const_iterator first,
std::vector<MxArray>::const_iterator last);
/** Create an instance of EMDL1HistogramCostExtractor using options in arguments
* @param first iterator at the beginning of the vector range
* @param last iterator at the end of the vector range
* @return smart pointer to created HistogramCostExtractor
*/
cv::Ptr<cv::HistogramCostExtractor> create_EMDL1HistogramCostExtractor(
std::vector<MxArray>::const_iterator first,
std::vector<MxArray>::const_iterator last);
/** Create an instance of HistogramCostExtractor using options in arguments
* @param type histogram cost extractor type, one of:
* - "NormHistogramCostExtractor"
* - "EMDHistogramCostExtractor"
* - "ChiHistogramCostExtractor"
* - "EMDL1HistogramCostExtractor"
* @param first iterator at the beginning of the vector range
* @param last iterator at the end of the vector range
* @return smart pointer to created HistogramCostExtractor
*/
cv::Ptr<cv::HistogramCostExtractor> create_HistogramCostExtractor(
const std::string& type,
std::vector<MxArray>::const_iterator first,
std::vector<MxArray>::const_iterator last);
/** Create an instance of AffineTransformer using options in arguments
* @param first iterator at the beginning of the vector range
* @param last iterator at the end of the vector range
* @return smart pointer to created AffineTransformer
*/
cv::Ptr<cv::AffineTransformer> create_AffineTransformer(
std::vector<MxArray>::const_iterator first,
std::vector<MxArray>::const_iterator last);
/** Create an instance of ThinPlateSplineShapeTransformer using options in arguments
* @param first iterator at the beginning of the vector range
* @param last iterator at the end of the vector range
* @return smart pointer to created ThinPlateSplineShapeTransformer
*/
cv::Ptr<cv::ThinPlateSplineShapeTransformer> create_ThinPlateSplineShapeTransformer(
std::vector<MxArray>::const_iterator first,
std::vector<MxArray>::const_iterator last);
/** Create an instance of ShapeTransformer using options in arguments
* @param type shape transformer type, one of:
* - "AffineTransformer"
* - "ThinPlateSplineShapeTransformer"
* @param first iterator at the beginning of the vector range
* @param last iterator at the end of the vector range
* @return smart pointer to created ShapeTransformer
*/
cv::Ptr<cv::ShapeTransformer> create_ShapeTransformer(
const std::string& type,
std::vector<MxArray>::const_iterator first,
std::vector<MxArray>::const_iterator last);
/** Create an instance of ShapeContextDistanceExtractor using options in arguments
* @param first iterator at the beginning of the vector range
* @param last iterator at the end of the vector range
* @return smart pointer to created ShapeContextDistanceExtractor
*/
cv::Ptr<cv::ShapeContextDistanceExtractor> create_ShapeContextDistanceExtractor(
std::vector<MxArray>::const_iterator first,
std::vector<MxArray>::const_iterator last);
/** Create an instance of HausdorffDistanceExtractor using options in arguments
* @param first iterator at the beginning of the vector range
* @param last iterator at the end of the vector range
* @return smart pointer to created HausdorffDistanceExtractor
*/
cv::Ptr<cv::HausdorffDistanceExtractor> create_HausdorffDistanceExtractor(
std::vector<MxArray>::const_iterator first,
std::vector<MxArray>::const_iterator last);
#endif