mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-03 18:20:34 +05:00
Porting to opencv-3.2.0.
This commit is contained in:
parent
9f557687e2
commit
3b33c84634
@ -27,6 +27,14 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
|
#include <opencv2/core/version.hpp>
|
||||||
|
|
||||||
|
|
||||||
|
#if CV_MAJOR_VERSION == 3
|
||||||
|
#define cvCvtPixToPlane cvSplit
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// TODO : All the following methods but ComputeContours use the C API of OpenCV while ComputContours
|
// TODO : All the following methods but ComputeContours use the C API of OpenCV while ComputContours
|
||||||
// uses the C++ API of the library.
|
// uses the C++ API of the library.
|
||||||
// This should be homogenized and preferably by using the C++ API (which is more recent for all the methods
|
// This should be homogenized and preferably by using the C++ API (which is more recent for all the methods
|
||||||
@ -233,7 +241,11 @@ bool ShapeRec_FeatureDetector::ComputeContours( bool useROI, ShapeRec_Parameters
|
|||||||
cvReleaseImage(&input_splane);
|
cvReleaseImage(&input_splane);
|
||||||
cvReleaseImage(&backproject);
|
cvReleaseImage(&backproject);
|
||||||
|
|
||||||
|
#if CV_MAJOR_VERSION == 3
|
||||||
|
detected_edges = cv::cvarrToMat(binary_backproject);
|
||||||
|
#else
|
||||||
detected_edges = cv::Mat(binary_backproject);
|
detected_edges = cv::Mat(binary_backproject);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
// else if ( detection_method == RIDGE_DETECTOR ) // Method adapted for engineering drawings (e.g. watershed functionality could be used here cf.OpenCV documentation and samples)
|
// else if ( detection_method == RIDGE_DETECTOR ) // Method adapted for engineering drawings (e.g. watershed functionality could be used here cf.OpenCV documentation and samples)
|
||||||
// {
|
// {
|
||||||
|
Loading…
Reference in New Issue
Block a user