Commit 9b55c04e authored by Muresan Mircea Paul's avatar Muresan Mircea Paul

I have put all the modules in the stereo namespace

changed the ptr<StereBinaryBM> to ptr<cv::stereo::StereoBinaryBM>

modified the documentation

modified documentation for the stereo_c

documentation

doc

fixed two issues

modfified the precomp.hpp header by explicitly adding the cvdef header from core

modified comments for documentation for stereo and removed some headers

added a header and modified some function definition

test

test 2

changed exports_w to exports

removed the correct matches module
parent 0d1fd8de
This diff is collapsed.
...@@ -46,3 +46,4 @@ ...@@ -46,3 +46,4 @@
#endif #endif
#include "opencv2/stereo.hpp" #include "opencv2/stereo.hpp"
...@@ -52,17 +52,14 @@ extern "C" { ...@@ -52,17 +52,14 @@ extern "C" {
/** @addtogroup stereo_c /** @addtogroup stereo_c
@{ @{
*/ **/
/****************************************************************************************\ //! stereo correspondence parameters and functions
* Stereo *
\****************************************************************************************/
/* stereo correspondence parameters and functions */
#define CV_STEREO_BM_NORMALIZED_RESPONSE 0 #define CV_STEREO_BM_NORMALIZED_RESPONSE 0
#define CV_STEREO_BM_XSOBEL 1 #define CV_STEREO_BM_XSOBEL 1
/* Block matching algorithm structure */ //! Block matching algorithm structure
typedef struct CvStereoBinaryBMState typedef struct CvStereoBinaryBMState
{ {
// pre-filtering (normalization of input images) // pre-filtering (normalization of input images)
...@@ -109,14 +106,15 @@ CVAPI(void) cvReleaseStereoBinaryBMState( CvStereoBinaryBMState** state ); ...@@ -109,14 +106,15 @@ CVAPI(void) cvReleaseStereoBinaryBMState( CvStereoBinaryBMState** state );
CVAPI(void) cvFindStereoCorrespondenceBinaryBM( const CvArr* left, const CvArr* right, CVAPI(void) cvFindStereoCorrespondenceBinaryBM( const CvArr* left, const CvArr* right,
CvArr* disparity, CvStereoBinaryBMState* state ); CvArr* disparity, CvStereoBinaryBMState* state );
CVAPI(CvRect) cvGetValidDisparityROI( CvRect roi1, CvRect roi2, int minDisparity, CVAPI(CvRect) cvStereoBinaryGetValidDisparityROI( CvRect roi1, CvRect roi2, int minDisparity,
int numberOfDisparities, int SADWindowSize ); int numberOfDisparities, int SADWindowSize );
CVAPI(void) cvValidateDisparity( CvArr* disparity, const CvArr* cost, CVAPI(void) cvStereoBinaryValidateDisparity( CvArr* disparity, const CvArr* cost,
int minDisparity, int numberOfDisparities, int minDisparity, int numberOfDisparities,
int disp12MaxDiff CV_DEFAULT(1) ); int disp12MaxDiff CV_DEFAULT(1) );
/** @} stereo_c */
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif #endif
#endif /* __OPENCV_STEREO_C_H__ */ #endif /* __OPENCV_STEREO_C_H__ */
...@@ -92,7 +92,7 @@ void cvFindStereoCorrespondenceBinaryBM( const CvArr* leftarr, const CvArr* righ ...@@ -92,7 +92,7 @@ void cvFindStereoCorrespondenceBinaryBM( const CvArr* leftarr, const CvArr* righ
CV_Assert( state != 0 ); CV_Assert( state != 0 );
cv::Ptr<cv::StereoBinaryBM> sm = cv::StereoBinaryBM::create(state->numberOfDisparities, cv::Ptr<cv::stereo::StereoBinaryBM> sm = cv::stereo::StereoBinaryBM::create(state->numberOfDisparities,
state->SADWindowSize); state->SADWindowSize);
sm->setPreFilterType(state->preFilterType); sm->setPreFilterType(state->preFilterType);
sm->setPreFilterSize(state->preFilterSize); sm->setPreFilterSize(state->preFilterSize);
...@@ -108,17 +108,18 @@ void cvFindStereoCorrespondenceBinaryBM( const CvArr* leftarr, const CvArr* righ ...@@ -108,17 +108,18 @@ void cvFindStereoCorrespondenceBinaryBM( const CvArr* leftarr, const CvArr* righ
sm->compute(left, right, disp); sm->compute(left, right, disp);
} }
CvRect cvGetValidDisparityROI( CvRect roi1, CvRect roi2, int minDisparity, CvRect cvStereoBinaryGetValidDisparityROI( CvRect roi1, CvRect roi2, int minDisparity,
int numberOfDisparities, int SADWindowSize ) int numberOfDisparities, int SADWindowSize )
{ {
return (CvRect)cv::getValidDisparityROI( roi1, roi2, minDisparity, return (CvRect)cv::stereo::getValidDisparityROI( roi1, roi2, minDisparity,
numberOfDisparities, SADWindowSize ); numberOfDisparities, SADWindowSize );
} }
void cvValidateDisparity( CvArr* _disp, const CvArr* _cost, int minDisparity, void cvStereoBinaryValidateDisparity( CvArr* _disp, const CvArr* _cost, int minDisparity,
int numberOfDisparities, int disp12MaxDiff ) int numberOfDisparities, int disp12MaxDiff )
{ {
cv::Mat disp = cv::cvarrToMat(_disp), cost = cv::cvarrToMat(_cost); cv::Mat disp = cv::cvarrToMat(_disp), cost = cv::cvarrToMat(_cost);
cv::validateDisparity( disp, cost, minDisparity, numberOfDisparities, disp12MaxDiff ); cv::stereo::validateDisparity( disp, cost, minDisparity, numberOfDisparities, disp12MaxDiff );
} }
...@@ -45,9 +45,10 @@ ...@@ -45,9 +45,10 @@
#include "opencv2/stereo.hpp" #include "opencv2/stereo.hpp"
#include "opencv2/imgproc.hpp" #include "opencv2/imgproc.hpp"
#include "opencv2/features2d.hpp" #include "opencv2/features2d.hpp"
#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp" #include "opencv2/core/utility.hpp"
#include "opencv2/core/private.hpp" #include "opencv2/core/private.hpp"
#include "opencv2/core.hpp" #include "opencv2/core/cvdef.h"
#include "opencv2/highgui.hpp" #include "opencv2/highgui.hpp"
#include <algorithm> #include <algorithm>
......
This diff is collapsed.
This diff is collapsed.
...@@ -11,10 +11,21 @@ ...@@ -11,10 +11,21 @@
#include <iostream> #include <iostream>
#include "opencv2/ts.hpp" #include "opencv2/ts.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/stereo.hpp"
#include "opencv2/imgcodecs.hpp" #include "opencv2/imgcodecs.hpp"
#include "opencv2/stereo.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/private.hpp"
#include "opencv2/core/cvdef.h"
#include "opencv2/core.hpp" #include "opencv2/core.hpp"
#include "opencv2/highgui.hpp" #include "opencv2/highgui.hpp"
#include <algorithm>
#include <cmath>
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment