Commit 9c0e1525 authored by Alexander Alekhin's avatar Alexander Alekhin

stereo: restore public descriptor.hpp

parents 4d57438c 20576d85
set(the_description "Stereo Correspondence")
ocv_define_module(stereo opencv_imgproc opencv_features2d opencv_core opencv_calib3d)
ocv_define_module(stereo opencv_core opencv_imgproc opencv_calib3d)
......@@ -45,10 +45,7 @@
#define __OPENCV_STEREO_HPP__
#include "opencv2/core.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/core/affine.hpp"
#include "opencv2/stereo/descriptor.hpp"
#include "opencv2/stereo/matching.hpp"
/**
@defgroup stereo Stereo Correspondance Algorithms
......@@ -61,8 +58,6 @@ namespace cv
{
//! @addtogroup stereo
//! @{
// void correctMatches( InputArray F, InputArray points1, InputArray points2,
// OutputArray newPoints1, OutputArray newPoints2 );
/** @brief Filters off small noise blobs (speckles) in the disparity map
@param img The input 16-bit signed disparity image
@param newVal The disparity value used to paint-off the speckles
......
......@@ -6,9 +6,6 @@
#include "opencv2/ts.hpp"
#include "opencv2/stereo.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/calib3d.hpp"
namespace opencv_test {
using namespace cv::stereo;
......
......@@ -125,7 +125,7 @@ namespace cv
//the sencond modified census transform is invariant to noise; i.e.
//if the current pixel with whom we are dooing the comparison is a noise, this descriptor will provide a better result by comparing with the mean of the window
//otherwise if the pixel is not noise the information is strengthend
CV_EXPORTS void modifiedCensusTransform(const Mat &img1, const Mat &img2, int kernelSize, Mat &dist1,Mat &dist2, const int type, int t, const Mat &IntegralImage1, const Mat &IntegralImage2 )
CV_EXPORTS void modifiedCensusTransform(const Mat &img1, const Mat &img2, int kernelSize, Mat &dist1,Mat &dist2, const int type, int t, const Mat& integralImage1, const Mat& integralImage2)
{
CV_Assert(img1.size() == img2.size());
CV_Assert(kernelSize % 2 != 0);
......@@ -145,14 +145,25 @@ namespace cv
else if(type == CV_MEAN_VARIATION)
{
//MV
int *integral[2];
integral[0] = (int *)IntegralImage1.data;
integral[1] = (int *)IntegralImage2.data;
CV_Assert(!integralImage1.empty());
CV_Assert(!integralImage1.isContinuous());
CV_CheckTypeEQ(integralImage1.type(), CV_32SC1, "");
CV_CheckGE(integralImage1.cols, img1.cols, "");
CV_CheckGE(integralImage1.rows, img1.rows, "");
CV_Assert(!integralImage2.empty());
CV_Assert(!integralImage2.isContinuous());
CV_CheckTypeEQ(integralImage2.type(), CV_32SC1, "");
CV_CheckGE(integralImage2.cols, img2.cols, "");
CV_CheckGE(integralImage2.rows, img2.rows, "");
int *integral[2] = {
(int *)integralImage1.data,
(int *)integralImage2.data
};
parallel_for_( Range(n2, img1.rows - n2),
CombinedDescriptor<2,3,2,2, MVKernel<2> >(img1.cols, img1.rows,stride,n2,date,MVKernel<2>(images,integral),n2));
}
}
CV_EXPORTS void modifiedCensusTransform(const Mat &img1, int kernelSize, Mat &dist, const int type, int t , Mat const &IntegralImage)
CV_EXPORTS void modifiedCensusTransform(const Mat &img1, int kernelSize, Mat &dist, const int type, int t , Mat const &integralImage)
{
CV_Assert(img1.size() == dist.size());
CV_Assert(kernelSize % 2 != 0);
......@@ -172,7 +183,12 @@ namespace cv
else if(type == CV_MEAN_VARIATION)
{
//MV
int *integral[] = { (int *)IntegralImage.data};
CV_Assert(!integralImage.empty());
CV_Assert(!integralImage.isContinuous());
CV_CheckTypeEQ(integralImage.type(), CV_32SC1, "");
CV_CheckGE(integralImage.cols, img1.cols, "");
CV_CheckGE(integralImage.rows, img1.rows, "");
int *integral[] = { (int *)integralImage.data};
parallel_for_(Range(n2, img1.rows - n2),
CombinedDescriptor<2,3,2,1, MVKernel<1> >(img1.cols, img1.rows,stride,n2,date,MVKernel<1>(images,integral),n2));
}
......
This diff is collapsed.
......@@ -42,16 +42,13 @@
#ifndef __OPENCV_STEREO_PRECOMP_H__
#define __OPENCV_STEREO_PRECOMP_H__
#include "opencv2/stereo.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/private.hpp"
#include "opencv2/core/cvdef.h"
#include "opencv2/imgproc.hpp"
#include "opencv2/calib3d.hpp"
#include <algorithm>
#include <cmath>
#include "opencv2/stereo.hpp"
#include "descriptor.hpp"
#include "matching.hpp"
#endif
......@@ -6,8 +6,6 @@
#include "opencv2/ts.hpp"
#include "opencv2/stereo.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/calib3d.hpp"
namespace opencv_test {
using namespace cv::stereo;
......
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