Skip to content

Commit 5fbfa11

Browse files
Alexander MordvintsevAlexander Mordvintsev
authored andcommitted
ьфлу opencv_cudaarithm dependency for xfeatures2d optional
RFFeatureGetter* -> Ptr<RFFeatureGetter> (need this for python wrapper and proper pointer handling)
1 parent 071eb5a commit 5fbfa11

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

modules/xfeatures2d/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
set(the_description "Contributed/Experimental Algorithms for Salient 2D Features Detection")
2-
ocv_define_module(xfeatures2d opencv_core opencv_cudaarithm opencv_imgproc opencv_features2d opencv_calib3d opencv_shape opencv_highgui opencv_videoio opencv_ml)
2+
ocv_define_module(xfeatures2d opencv_core opencv_imgproc opencv_features2d opencv_calib3d opencv_shape opencv_highgui opencv_videoio opencv_ml OPTIONAL opencv_cudaarithm)

modules/ximgproc/include/opencv2/ximgproc/structured_edge_detection.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class CV_EXPORTS_W StructuredEdgeDetection : public Algorithm
107107
* \param dst : destination image (grayscale, float, in [0;1])
108108
* where edges are drawn
109109
*/
110-
CV_WRAP virtual void detectEdges(const Mat &src, Mat &dst) const = 0;
110+
CV_WRAP virtual void detectEdges(const Mat &src, CV_OUT Mat &dst) const = 0;
111111
};
112112

113113
/*!
@@ -119,7 +119,7 @@ class CV_EXPORTS_W StructuredEdgeDetection : public Algorithm
119119
* own forest, pass NULL otherwise
120120
*/
121121
CV_EXPORTS_W Ptr<StructuredEdgeDetection> createStructuredEdgeDetection(const String &model,
122-
const RFFeatureGetter *howToGetFeatures = NULL);
122+
Ptr<const RFFeatureGetter> howToGetFeatures = Ptr<RFFeatureGetter>());
123123

124124
}
125125
}

modules/ximgproc/src/structured_edge_detection.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@ class StructuredEdgeDetectionImpl : public StructuredEdgeDetection
339339
* \param filename : name of the file where the model is stored
340340
*/
341341
StructuredEdgeDetectionImpl(const cv::String &filename,
342-
const RFFeatureGetter *_howToGetFeatures)
342+
Ptr<const RFFeatureGetter> _howToGetFeatures)
343343
: name("StructuredEdgeDetection"),
344-
howToGetFeatures( _howToGetFeatures != NULL
344+
howToGetFeatures( (!_howToGetFeatures.empty())
345345
? _howToGetFeatures
346346
: createRFFeatureGetter() )
347347
{
@@ -631,7 +631,7 @@ class StructuredEdgeDetectionImpl : public StructuredEdgeDetection
631631
String name;
632632

633633
/*! optional feature getter (getFeatures method) */
634-
const RFFeatureGetter *howToGetFeatures;
634+
Ptr<const RFFeatureGetter> howToGetFeatures;
635635

636636
/*! random forest used to detect edges */
637637
struct RandomForest
@@ -684,7 +684,7 @@ class StructuredEdgeDetectionImpl : public StructuredEdgeDetection
684684
};
685685

686686
Ptr<StructuredEdgeDetection> createStructuredEdgeDetection(const String &model,
687-
const RFFeatureGetter *howToGetFeatures)
687+
Ptr<const RFFeatureGetter> howToGetFeatures)
688688
{
689689
return makePtr<StructuredEdgeDetectionImpl>(model, howToGetFeatures);
690690
}

0 commit comments

Comments
 (0)