Skip to content

Commit f9e7d34

Browse files
committed
fix
1 parent 0306ba9 commit f9e7d34

5 files changed

Lines changed: 79 additions & 79 deletions

File tree

src/OpenCvSharpExtern/features2d_DescriptorMatcher.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#pragma once
1+
#pragma once
22

33
#ifndef NO_FEATURES2D
44

@@ -144,18 +144,17 @@ CVAPI(ExceptionStatus) features2d_DescriptorMatcher_create(
144144
END_WRAP
145145
}
146146

147-
148-
CVAPI(ExceptionStatus) features2d_Ptr_DescriptorMatcher_delete(cv::Ptr<cv::DescriptorMatcher> *ptr)
147+
CVAPI(ExceptionStatus) features2d_Ptr_DescriptorMatcher_get(
148+
cv::Ptr<cv::DescriptorMatcher> *ptr, cv::DescriptorMatcher **returnValue)
149149
{
150150
BEGIN_WRAP
151-
delete ptr;
151+
*returnValue = ptr->get();
152152
END_WRAP
153153
}
154-
155-
CVAPI(ExceptionStatus) features2d_Ptr_DescriptorMatcher_get(cv::Ptr<cv::DescriptorMatcher> *obj, cv::DescriptorMatcher **returnValue)
154+
CVAPI(ExceptionStatus) features2d_Ptr_DescriptorMatcher_delete(cv::Ptr<cv::DescriptorMatcher> *ptr)
156155
{
157156
BEGIN_WRAP
158-
*returnValue = obj->get();
157+
delete ptr;
159158
END_WRAP
160159
}
161160

@@ -184,18 +183,17 @@ CVAPI(ExceptionStatus) features2d_BFMatcher_isMaskSupported(cv::BFMatcher *obj,
184183
END_WRAP
185184
}
186185

187-
188-
CVAPI(ExceptionStatus) features2d_Ptr_BFMatcher_delete(cv::Ptr<cv::BFMatcher> *ptr)
186+
CVAPI(ExceptionStatus) features2d_Ptr_BFMatcher_get(cv::Ptr<cv::BFMatcher> *ptr, cv::BFMatcher **returnValue)
189187
{
190188
BEGIN_WRAP
191-
delete ptr;
189+
*returnValue = ptr->get();
192190
END_WRAP
193191
}
194192

195-
CVAPI(ExceptionStatus) features2d_Ptr_BFMatcher_get(cv::Ptr<cv::BFMatcher> *obj, cv::BFMatcher **returnValue)
193+
CVAPI(ExceptionStatus) features2d_Ptr_BFMatcher_delete(cv::Ptr<cv::BFMatcher> *ptr)
196194
{
197195
BEGIN_WRAP
198-
*returnValue = obj->get();
196+
delete ptr;
199197
END_WRAP
200198
}
201199

@@ -264,19 +262,21 @@ CVAPI(ExceptionStatus) features2d_FlannBasedMatcher_isMaskSupported(cv::FlannBas
264262
END_WRAP
265263
}
266264

267-
268-
CVAPI(ExceptionStatus) features2d_Ptr_FlannBasedMatcher_delete(cv::Ptr<cv::FlannBasedMatcher> *ptr)
265+
CVAPI(ExceptionStatus) features2d_Ptr_FlannBasedMatcher_get(
266+
cv::Ptr<cv::FlannBasedMatcher> *ptr, cv::FlannBasedMatcher **returnValue)
269267
{
270268
BEGIN_WRAP
271-
delete ptr;
269+
*returnValue = ptr->get();
272270
END_WRAP
273271
}
274272

275-
CVAPI(ExceptionStatus) features2d_Ptr_FlannBasedMatcher_get(cv::Ptr<cv::FlannBasedMatcher> *obj, cv::FlannBasedMatcher **returnValue)
273+
CVAPI(ExceptionStatus) features2d_Ptr_FlannBasedMatcher_delete(cv::Ptr<cv::FlannBasedMatcher> *ptr)
276274
{
277275
BEGIN_WRAP
278-
*returnValue = obj->get();
276+
delete ptr;
279277
END_WRAP
280278
}
281279

280+
#pragma endregion
281+
282282
#endif // NO_FEATURES2D

src/OpenCvSharpExtern/features2d_Feature2D.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111
#pragma region Feature2D
1212

1313
CVAPI(ExceptionStatus) features2d_Feature2D_detect_Mat1(
14-
cv::Ptr<cv::Feature2D> *detector,
14+
cv::Feature2D *detector,
1515
cv::Mat *image,
1616
std::vector<cv::KeyPoint> *keypoints,
1717
cv::Mat *mask)
1818
{
1919
BEGIN_WRAP
20-
(*detector)->detect(*image, *keypoints, entity(mask));
20+
detector->detect(*image, *keypoints, entity(mask));
2121
END_WRAP
2222
}
2323

2424
CVAPI(ExceptionStatus) features2d_Feature2D_detect_Mat2(
25-
cv::Ptr<cv::Feature2D> *detector,
25+
cv::Feature2D *detector,
2626
cv::Mat **images, int imageLength,
2727
std::vector<std::vector<cv::KeyPoint> > *keypoints,
2828
cv::Mat **mask)
@@ -41,7 +41,7 @@ CVAPI(ExceptionStatus) features2d_Feature2D_detect_Mat2(
4141
maskVec.push_back(*mask[i]);
4242
}
4343

44-
(*detector)->detect(imageVec, *keypoints, maskVec);
44+
detector->detect(imageVec, *keypoints, maskVec);
4545
END_WRAP
4646
}
4747

@@ -63,7 +63,7 @@ CVAPI(ExceptionStatus) features2d_Feature2D_compute1(
6363
}
6464

6565
CVAPI(ExceptionStatus) features2d_Feature2D_compute2(
66-
cv::Ptr<cv::Feature2D> *detector, cv::Mat **images, int imageLength,
66+
cv::Feature2D *detector, cv::Mat **images, int imageLength,
6767
std::vector<std::vector<cv::KeyPoint> > *keypoints, cv::Mat **descriptors, int descriptorsLength)
6868
{
6969
BEGIN_WRAP
@@ -75,16 +75,16 @@ CVAPI(ExceptionStatus) features2d_Feature2D_compute2(
7575
for (auto i = 0; i < descriptorsLength; i++)
7676
descriptorsVec.push_back(*descriptors[i]);
7777

78-
(*detector)->compute(imageVec, *keypoints, descriptorsVec);
78+
detector->compute(imageVec, *keypoints, descriptorsVec);
7979
END_WRAP
8080
}
8181

8282
CVAPI(ExceptionStatus) features2d_Feature2D_detectAndCompute(
83-
cv::Ptr<cv::Feature2D> *detector, cv::_InputArray *image, cv::_InputArray *mask,
83+
cv::Feature2D *detector, cv::_InputArray *image, cv::_InputArray *mask,
8484
std::vector<cv::KeyPoint> *keypoints, cv::_OutputArray *descriptors, int useProvidedKeypoints)
8585
{
8686
BEGIN_WRAP
87-
(*detector)->detectAndCompute(entity(image), entity(mask), *keypoints, *descriptors, useProvidedKeypoints != 0);
87+
detector->detectAndCompute(entity(image), entity(mask), *keypoints, *descriptors, useProvidedKeypoints != 0);
8888
END_WRAP
8989
}
9090

src/OpenCvSharpExtern/imgproc_LineSegmentDetector.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,27 @@
66

77
#include "include_opencv.h"
88

9-
CVAPI(void) imgproc_LineSegmentDetector_detect_OutputArray(cv::Ptr<cv::LineSegmentDetector>* obj, cv::_InputArray *image, cv::_OutputArray *lines,
9+
CVAPI(void) imgproc_LineSegmentDetector_detect_OutputArray(cv::LineSegmentDetector* obj, cv::_InputArray *image, cv::_OutputArray *lines,
1010
cv::_OutputArray *width, cv::_OutputArray *prec, cv::_OutputArray *nfa)
1111
{
12-
(*obj)->detect(*image, *lines, entity(width), entity(prec), entity(nfa));
12+
obj->detect(*image, *lines, entity(width), entity(prec), entity(nfa));
1313
}
1414

15-
CVAPI(void) imgproc_LineSegmentDetector_detect_vector(cv::Ptr<cv::LineSegmentDetector>* obj, cv::_InputArray *image, std::vector<cv::Vec4f> *lines,
15+
CVAPI(void) imgproc_LineSegmentDetector_detect_vector(cv::LineSegmentDetector* obj, cv::_InputArray *image, std::vector<cv::Vec4f> *lines,
1616
std::vector<double> *width, std::vector<double> *prec, std::vector<double> *nfa)
1717
{
18-
(*obj)->detect(*image, *lines, *width, *prec, *nfa);
18+
obj->detect(*image, *lines, *width, *prec, *nfa);
1919
}
2020

21-
CVAPI(void) imgproc_LineSegmentDetector_drawSegments(cv::Ptr<cv::LineSegmentDetector>* obj, cv::_InputOutputArray *image, cv::_InputArray *lines)
21+
CVAPI(void) imgproc_LineSegmentDetector_drawSegments(cv::LineSegmentDetector* obj, cv::_InputOutputArray *image, cv::_InputArray *lines)
2222
{
23-
(*obj)->drawSegments(*image, *lines);
23+
obj->drawSegments(*image, *lines);
2424
}
2525

26-
CVAPI(int) imgproc_LineSegmentDetector_compareSegments(cv::Ptr<cv::LineSegmentDetector>* obj, MyCvSize size,
26+
CVAPI(int) imgproc_LineSegmentDetector_compareSegments(cv::LineSegmentDetector* obj, MyCvSize size,
2727
cv::_InputArray *lines1, cv::_InputArray *lines2, cv::_InputOutputArray *image)
2828
{
29-
return (*obj)->compareSegments(cpp(size), *lines1, *lines2, entity(image));
29+
return obj->compareSegments(cpp(size), *lines1, *lines2, entity(image));
3030
}
3131

3232

src/OpenCvSharpExtern/tracking.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ CVAPI(ExceptionStatus) tracking_Ptr_TrackerCSRT_delete(cv::Ptr<cv::TrackerCSRT>*
109109
}
110110

111111

112-
CVAPI(ExceptionStatus) tracking_TrackerCSRT_setInitialMask(cv::Ptr<cv::TrackerCSRT>* tracker, cv::_InputArray *mask)
112+
CVAPI(ExceptionStatus) tracking_TrackerCSRT_setInitialMask(cv::TrackerCSRT* tracker, cv::_InputArray *mask)
113113
{
114114
BEGIN_WRAP
115-
(*tracker)->setInitialMask(*mask);
115+
tracker->setInitialMask(*mask);
116116
END_WRAP
117117
}
118118

src/OpenCvSharpExtern/xphoto.h

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,23 @@ CVAPI(ExceptionStatus) xphoto_Ptr_GrayworldWB_delete(cv::Ptr<cv::xphoto::Graywor
4444
}
4545

4646

47-
CVAPI(ExceptionStatus) xphoto_GrayworldWB_balanceWhite(cv::Ptr<cv::xphoto::GrayworldWB>* ptr, cv::_InputArray *src, cv::_OutputArray *dst)
47+
CVAPI(ExceptionStatus) xphoto_GrayworldWB_balanceWhite(cv::xphoto::GrayworldWB* ptr, cv::_InputArray *src, cv::_OutputArray *dst)
4848
{
4949
BEGIN_WRAP
50-
(*ptr)->balanceWhite(*src, *dst);
50+
ptr->balanceWhite(*src, *dst);
5151
END_WRAP
5252
}
5353

54-
CVAPI(ExceptionStatus) xphoto_GrayworldWB_SaturationThreshold_get(cv::Ptr<cv::xphoto::GrayworldWB>* ptr, float* returnValue)
54+
CVAPI(ExceptionStatus) xphoto_GrayworldWB_SaturationThreshold_get(cv::xphoto::GrayworldWB* ptr, float* returnValue)
5555
{
5656
BEGIN_WRAP
57-
*returnValue = (*ptr)->getSaturationThreshold();
57+
*returnValue = ptr->getSaturationThreshold();
5858
END_WRAP
5959
}
60-
CVAPI(ExceptionStatus) xphoto_GrayworldWB_SaturationThreshold_set(cv::Ptr<cv::xphoto::GrayworldWB>* ptr, float val)
60+
CVAPI(ExceptionStatus) xphoto_GrayworldWB_SaturationThreshold_set(cv::xphoto::GrayworldWB* ptr, float val)
6161
{
6262
BEGIN_WRAP
63-
(*ptr)->setSaturationThreshold(val);
63+
ptr->setSaturationThreshold(val);
6464
END_WRAP
6565
}
6666

@@ -81,56 +81,56 @@ CVAPI(ExceptionStatus) xphoto_Ptr_LearningBasedWB_delete(cv::Ptr<cv::xphoto::Lea
8181
}
8282

8383

84-
CVAPI(ExceptionStatus) xphoto_LearningBasedWB_balanceWhite(cv::Ptr<cv::xphoto::LearningBasedWB>* ptr, cv::_InputArray *src, cv::_OutputArray *dst)
84+
CVAPI(ExceptionStatus) xphoto_LearningBasedWB_balanceWhite(cv::xphoto::LearningBasedWB* ptr, cv::_InputArray *src, cv::_OutputArray *dst)
8585
{
8686
BEGIN_WRAP
87-
(*ptr)->balanceWhite(*src, *dst);
87+
ptr->balanceWhite(*src, *dst);
8888
END_WRAP
8989
}
9090

91-
CVAPI(ExceptionStatus) xphoto_LearningBasedWB_extractSimpleFeatures(cv::Ptr<cv::xphoto::LearningBasedWB>* ptr, cv::_InputArray *src, cv::_OutputArray *dst)
91+
CVAPI(ExceptionStatus) xphoto_LearningBasedWB_extractSimpleFeatures(cv::xphoto::LearningBasedWB* ptr, cv::_InputArray *src, cv::_OutputArray *dst)
9292
{
9393
BEGIN_WRAP
94-
(*ptr)->extractSimpleFeatures(*src, *dst);
94+
ptr->extractSimpleFeatures(*src, *dst);
9595
END_WRAP
9696
}
9797

98-
CVAPI(ExceptionStatus) xphoto_LearningBasedWB_RangeMaxVal_get(cv::Ptr<cv::xphoto::LearningBasedWB>* ptr, int *returnValue)
98+
CVAPI(ExceptionStatus) xphoto_LearningBasedWB_RangeMaxVal_get(cv::xphoto::LearningBasedWB* ptr, int *returnValue)
9999
{
100100
BEGIN_WRAP
101-
*returnValue = (*ptr)->getRangeMaxVal();
101+
*returnValue = ptr->getRangeMaxVal();
102102
END_WRAP
103103
}
104-
CVAPI(ExceptionStatus) xphoto_LearningBasedWB_RangeMaxVal_set(cv::Ptr<cv::xphoto::LearningBasedWB>* ptr, int val)
104+
CVAPI(ExceptionStatus) xphoto_LearningBasedWB_RangeMaxVal_set(cv::xphoto::LearningBasedWB* ptr, int val)
105105
{
106106
BEGIN_WRAP
107-
(*ptr)->setRangeMaxVal(val);
107+
ptr->setRangeMaxVal(val);
108108
END_WRAP
109109
}
110110

111-
CVAPI(ExceptionStatus) xphoto_LearningBasedWB_SaturationThreshold_get(cv::Ptr<cv::xphoto::LearningBasedWB>* ptr, float *returnValue)
111+
CVAPI(ExceptionStatus) xphoto_LearningBasedWB_SaturationThreshold_get(cv::xphoto::LearningBasedWB* ptr, float *returnValue)
112112
{
113113
BEGIN_WRAP
114-
*returnValue = (*ptr)->getSaturationThreshold();
114+
*returnValue = ptr->getSaturationThreshold();
115115
END_WRAP
116116
}
117-
CVAPI(ExceptionStatus) xphoto_LearningBasedWB_SaturationThreshold_set(cv::Ptr<cv::xphoto::LearningBasedWB>* ptr, float val)
117+
CVAPI(ExceptionStatus) xphoto_LearningBasedWB_SaturationThreshold_set(cv::xphoto::LearningBasedWB* ptr, float val)
118118
{
119119
BEGIN_WRAP
120-
(*ptr)->setSaturationThreshold(val);
120+
ptr->setSaturationThreshold(val);
121121
END_WRAP
122122
}
123123

124-
CVAPI(ExceptionStatus) xphoto_LearningBasedWB_HistBinNum_get(cv::Ptr<cv::xphoto::LearningBasedWB>* ptr, int *returnValue)
124+
CVAPI(ExceptionStatus) xphoto_LearningBasedWB_HistBinNum_get(cv::xphoto::LearningBasedWB* ptr, int *returnValue)
125125
{
126126
BEGIN_WRAP
127-
*returnValue = (*ptr)->getHistBinNum();
127+
*returnValue = ptr->getHistBinNum();
128128
END_WRAP
129129
}
130-
CVAPI(ExceptionStatus) xphoto_LearningBasedWB_HistBinNum_set(cv::Ptr<cv::xphoto::LearningBasedWB>* ptr, int val)
130+
CVAPI(ExceptionStatus) xphoto_LearningBasedWB_HistBinNum_set(cv::xphoto::LearningBasedWB* ptr, int val)
131131
{
132132
BEGIN_WRAP
133-
(*ptr)->setHistBinNum(val);
133+
ptr->setHistBinNum(val);
134134
END_WRAP
135135
}
136136

@@ -150,75 +150,75 @@ CVAPI(ExceptionStatus) xphoto_Ptr_SimpleWB_delete(cv::Ptr<cv::xphoto::SimpleWB>
150150
}
151151

152152

153-
CVAPI(ExceptionStatus) xphoto_SimpleWB_balanceWhite(cv::Ptr<cv::xphoto::SimpleWB>* ptr, cv::_InputArray *src, cv::_OutputArray *dst)
153+
CVAPI(ExceptionStatus) xphoto_SimpleWB_balanceWhite(cv::xphoto::SimpleWB* ptr, cv::_InputArray *src, cv::_OutputArray *dst)
154154
{
155155
BEGIN_WRAP
156-
(*ptr)->balanceWhite(*src, *dst);
156+
ptr->balanceWhite(*src, *dst);
157157
END_WRAP
158158
}
159159

160-
CVAPI(ExceptionStatus) xphoto_SimpleWB_InputMax_get(cv::Ptr<cv::xphoto::SimpleWB>* ptr, float *returnValue)
160+
CVAPI(ExceptionStatus) xphoto_SimpleWB_InputMax_get(cv::xphoto::SimpleWB* ptr, float *returnValue)
161161
{
162162
BEGIN_WRAP
163-
*returnValue = (*ptr)->getInputMax();
163+
*returnValue = ptr->getInputMax();
164164
END_WRAP
165165
}
166-
CVAPI(ExceptionStatus) xphoto_SimpleWB_InputMax_set(cv::Ptr<cv::xphoto::SimpleWB>* ptr, float val)
166+
CVAPI(ExceptionStatus) xphoto_SimpleWB_InputMax_set(cv::xphoto::SimpleWB* ptr, float val)
167167
{
168168
BEGIN_WRAP
169-
(*ptr)->setInputMax(val);
169+
ptr->setInputMax(val);
170170
END_WRAP
171171
}
172172

173-
CVAPI(ExceptionStatus) xphoto_SimpleWB_InputMin_get(cv::Ptr<cv::xphoto::SimpleWB>* ptr, float *returnValue)
173+
CVAPI(ExceptionStatus) xphoto_SimpleWB_InputMin_get(cv::xphoto::SimpleWB* ptr, float *returnValue)
174174
{
175175
BEGIN_WRAP
176-
*returnValue = (*ptr)->getInputMin();
176+
*returnValue = ptr->getInputMin();
177177
END_WRAP
178178
}
179-
CVAPI(ExceptionStatus) xphoto_SimpleWB_InputMin_set(cv::Ptr<cv::xphoto::SimpleWB>* ptr, float val)
179+
CVAPI(ExceptionStatus) xphoto_SimpleWB_InputMin_set(cv::xphoto::SimpleWB* ptr, float val)
180180
{
181181
BEGIN_WRAP
182-
(*ptr)->setInputMin(val);
182+
ptr->setInputMin(val);
183183
END_WRAP
184184
}
185185

186-
CVAPI(ExceptionStatus) xphoto_SimpleWB_OutputMax_get(cv::Ptr<cv::xphoto::SimpleWB>* ptr, float *returnValue)
186+
CVAPI(ExceptionStatus) xphoto_SimpleWB_OutputMax_get(cv::xphoto::SimpleWB* ptr, float *returnValue)
187187
{
188188
BEGIN_WRAP
189-
*returnValue = (*ptr)->getOutputMax();
189+
*returnValue = ptr->getOutputMax();
190190
END_WRAP
191191
}
192-
CVAPI(ExceptionStatus) xphoto_SimpleWB_OutputMax_set(cv::Ptr<cv::xphoto::SimpleWB>* ptr, float val)
192+
CVAPI(ExceptionStatus) xphoto_SimpleWB_OutputMax_set(cv::xphoto::SimpleWB* ptr, float val)
193193
{
194194
BEGIN_WRAP
195-
(*ptr)->setOutputMax(val);
195+
ptr->setOutputMax(val);
196196
END_WRAP
197197
}
198198

199-
CVAPI(ExceptionStatus) xphoto_SimpleWB_OutputMin_get(cv::Ptr<cv::xphoto::SimpleWB>* ptr, float *returnValue)
199+
CVAPI(ExceptionStatus) xphoto_SimpleWB_OutputMin_get(cv::xphoto::SimpleWB* ptr, float *returnValue)
200200
{
201201
BEGIN_WRAP
202-
*returnValue = (*ptr)->getOutputMin();
202+
*returnValue = ptr->getOutputMin();
203203
END_WRAP
204204
}
205-
CVAPI(ExceptionStatus) xphoto_SimpleWB_OutputMin_set(cv::Ptr<cv::xphoto::SimpleWB>* ptr, float val)
205+
CVAPI(ExceptionStatus) xphoto_SimpleWB_OutputMin_set(cv::xphoto::SimpleWB* ptr, float val)
206206
{
207207
BEGIN_WRAP
208-
(*ptr)->setOutputMin(val);
208+
ptr->setOutputMin(val);
209209
END_WRAP
210210
}
211211

212-
CVAPI(ExceptionStatus) xphoto_SimpleWB_P_get(cv::Ptr<cv::xphoto::SimpleWB>* ptr, float *returnValue)
212+
CVAPI(ExceptionStatus) xphoto_SimpleWB_P_get(cv::xphoto::SimpleWB* ptr, float *returnValue)
213213
{
214214
BEGIN_WRAP
215-
*returnValue = (*ptr)->getP();
215+
*returnValue = ptr->getP();
216216
END_WRAP
217217
}
218-
CVAPI(ExceptionStatus) xphoto_SimpleWB_P_set(cv::Ptr<cv::xphoto::SimpleWB>* ptr, float val)
218+
CVAPI(ExceptionStatus) xphoto_SimpleWB_P_set(cv::xphoto::SimpleWB* ptr, float val)
219219
{
220220
BEGIN_WRAP
221-
(*ptr)->setP(val);
221+
ptr->setP(val);
222222
END_WRAP
223223
}
224224

0 commit comments

Comments
 (0)