Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class CV_EXPORTS_W StructuredEdgeDetection : public Algorithm
* \param dst : destination image (grayscale, float, in [0;1])
* where edges are drawn
*/
CV_WRAP virtual void detectEdges(const Mat &src, Mat &dst) const = 0;
CV_WRAP virtual void detectEdges(const Mat &src, CV_OUT Mat &dst) const = 0;
};

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

}
}
Expand Down
10 changes: 5 additions & 5 deletions modules/ximgproc/src/structured_edge_detection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,11 @@ class StructuredEdgeDetectionImpl : public StructuredEdgeDetection
* \param filename : name of the file where the model is stored
*/
StructuredEdgeDetectionImpl(const cv::String &filename,
const RFFeatureGetter *_howToGetFeatures)
Ptr<const RFFeatureGetter> _howToGetFeatures)
: name("StructuredEdgeDetection"),
howToGetFeatures( _howToGetFeatures != NULL
howToGetFeatures( (!_howToGetFeatures.empty())
? _howToGetFeatures
: createRFFeatureGetter() )
: createRFFeatureGetter().staticCast<const RFFeatureGetter>() )
{
cv::FileStorage modelFile(filename, FileStorage::READ);
CV_Assert( modelFile.isOpened() );
Expand Down Expand Up @@ -631,7 +631,7 @@ class StructuredEdgeDetectionImpl : public StructuredEdgeDetection
String name;

/*! optional feature getter (getFeatures method) */
const RFFeatureGetter *howToGetFeatures;
Ptr<const RFFeatureGetter> howToGetFeatures;

/*! random forest used to detect edges */
struct RandomForest
Expand Down Expand Up @@ -684,7 +684,7 @@ class StructuredEdgeDetectionImpl : public StructuredEdgeDetection
};

Ptr<StructuredEdgeDetection> createStructuredEdgeDetection(const String &model,
const RFFeatureGetter *howToGetFeatures)
Ptr<const RFFeatureGetter> howToGetFeatures)
{
return makePtr<StructuredEdgeDetectionImpl>(model, howToGetFeatures);
}
Expand Down