fixed ~200 warnings for windows
minor build system changes (now cuda code in opencv_core is compiled using CUDA_ARCH* cmake variables)
This commit is contained in:
parent
8f4d63913a
commit
84db4eb6fa
@ -24,7 +24,13 @@ if(OPENNI_LIBRARY AND OPENNI_INCLUDES)
|
|||||||
set(HAVE_OPENNI TRUE)
|
set(HAVE_OPENNI TRUE)
|
||||||
# the check: are PrimeSensor Modules for OpenNI installed
|
# the check: are PrimeSensor Modules for OpenNI installed
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
find_file(OPENNI_PRIME_SENSOR_MODULE "XnCore.dll" PATHS "c:/Program Files/Prime Sense/Sensor/Bin" DOC "Core library of PrimeSensor Modules for OpenNI")
|
find_file(OPENNI_PRIME_SENSOR_MODULE "XnCore.dll"
|
||||||
|
PATHS
|
||||||
|
"c:/Program Files/Prime Sense/Sensor/Bin"
|
||||||
|
"c:/Program Files (x86)/Prime Sense/Sensor/Bin"
|
||||||
|
"c:/Program Files/PrimeSense/SensorKinect/Bin"
|
||||||
|
"c:/Program Files (x86)/PrimeSense/SensorKinect/Bin"
|
||||||
|
DOC "Core library of PrimeSensor Modules for OpenNI")
|
||||||
elseif(UNIX OR APPLE)
|
elseif(UNIX OR APPLE)
|
||||||
find_library(OPENNI_PRIME_SENSOR_MODULE "XnCore" PATHS "/usr/lib" DOC "Core library of PrimeSensor Modules for OpenNI")
|
find_library(OPENNI_PRIME_SENSOR_MODULE "XnCore" PATHS "/usr/lib" DOC "Core library of PrimeSensor Modules for OpenNI")
|
||||||
endif()
|
endif()
|
||||||
|
@ -102,10 +102,10 @@ private:
|
|||||||
void print_information_8(int j, int N, int k, int l, double diff);
|
void print_information_8(int j, int N, int k, int l, double diff);
|
||||||
};
|
};
|
||||||
|
|
||||||
CV_HomographyTest::CV_HomographyTest() : max_diff(1e-2), max_2diff(2e-2)
|
CV_HomographyTest::CV_HomographyTest() : max_diff(1e-2f), max_2diff(2e-2f)
|
||||||
{
|
{
|
||||||
method = 0;
|
method = 0;
|
||||||
image_size = 1e+2;
|
image_size = 100;
|
||||||
reproj_threshold = 3.0;
|
reproj_threshold = 3.0;
|
||||||
sigma = 0.01;
|
sigma = 0.01;
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ void downsamplePoints( const Mat& src, Mat& dst, size_t count )
|
|||||||
{
|
{
|
||||||
for( int j = i; j < dists.cols; j++ )
|
for( int j = i; j < dists.cols; j++ )
|
||||||
{
|
{
|
||||||
float dist = norm(src.at<Point3_<uchar> >(i) - src.at<Point3_<uchar> >(j));
|
float dist = (float)norm(src.at<Point3_<uchar> >(i) - src.at<Point3_<uchar> >(j));
|
||||||
dists.at<float>(j, i) = dists.at<float>(i, j) = dist;
|
dists.at<float>(j, i) = dists.at<float>(i, j) = dist;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -231,6 +231,9 @@ private:
|
|||||||
bool _initLogRetinaSampling(const double reductionFactor, const double samplingStrenght);
|
bool _initLogRetinaSampling(const double reductionFactor, const double samplingStrenght);
|
||||||
bool _initLogPolarCortexSampling(const double reductionFactor, const double samplingStrenght);
|
bool _initLogPolarCortexSampling(const double reductionFactor, const double samplingStrenght);
|
||||||
|
|
||||||
|
ImageLogPolProjection(const ImageLogPolProjection&);
|
||||||
|
ImageLogPolProjection& operator=(const ImageLogPolProjection&);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -260,7 +260,7 @@ public:
|
|||||||
* @param sensitivity: strenght of the sigmoide
|
* @param sensitivity: strenght of the sigmoide
|
||||||
* @param maxOutputValue: the maximum output value
|
* @param maxOutputValue: the maximum output value
|
||||||
*/
|
*/
|
||||||
inline void normalizeGrayOutputCentredSigmoide(const type meanValue=(type)0.0, const type sensitivity=(type)2.0, const type maxOutputValue=(type)255.0){normalizeGrayOutputCentredSigmoide(meanValue, sensitivity, 255.0, this->Buffer(), this->Buffer(), this->getNBpixels());};
|
inline void normalizeGrayOutputCentredSigmoide(const type meanValue=(type)0.0, const type sensitivity=(type)2.0, const type maxOutputValue=(type)255.0){ (void)maxOutputValue; normalizeGrayOutputCentredSigmoide(meanValue, sensitivity, 255.0, this->Buffer(), this->Buffer(), this->getNBpixels());};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sigmoide image normalization function (saturates min and max values), in this function, the sigmoide is centered on low values (high saturation of the medium and high values
|
* sigmoide image normalization function (saturates min and max values), in this function, the sigmoide is centered on low values (high saturation of the medium and high values
|
||||||
|
@ -10,19 +10,9 @@ if(HAVE_CUDA)
|
|||||||
file(GLOB lib_cuda "src/cuda/*.cu")
|
file(GLOB lib_cuda "src/cuda/*.cu")
|
||||||
source_group("Cuda" FILES "${lib_cuda}")
|
source_group("Cuda" FILES "${lib_cuda}")
|
||||||
|
|
||||||
include_directories(${CUDA_INCLUDE_DIRS} "${OpenCV_SOURCE_DIR}/modules/gpu/src" "${OpenCV_SOURCE_DIR}/modules/gpu/src/cuda")
|
include_directories(${CUDA_INCLUDE_DIRS} "${OpenCV_SOURCE_DIR}/modules/gpu/src" "${OpenCV_SOURCE_DIR}/modules/gpu/src/cuda")
|
||||||
|
|
||||||
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10
|
|
||||||
-gencode arch=compute_11,code=sm_11
|
|
||||||
-gencode arch=compute_12,code=sm_12
|
|
||||||
-gencode arch=compute_13,code=sm_13
|
|
||||||
-gencode arch=compute_20,code=sm_20
|
|
||||||
-gencode arch=compute_20,code=sm_21)
|
|
||||||
|
|
||||||
OCV_CUDA_COMPILE(cuda_objs ${lib_cuda})
|
OCV_CUDA_COMPILE(cuda_objs ${lib_cuda})
|
||||||
|
|
||||||
unset(CUDA_npp_LIBRARY CACHE)
|
|
||||||
find_cuda_helper_libs(npp)
|
|
||||||
set(cuda_link_libs ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
|
set(cuda_link_libs ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
|
||||||
else()
|
else()
|
||||||
set(lib_cuda "")
|
set(lib_cuda "")
|
||||||
|
@ -291,7 +291,7 @@ template<typename _Tp>
|
|||||||
buf = "";
|
buf = "";
|
||||||
if (del_space(it->second[1]) != "") buf += del_space(it->second[1]);
|
if (del_space(it->second[1]) != "") buf += del_space(it->second[1]);
|
||||||
|
|
||||||
while (true)
|
for(;;)
|
||||||
{
|
{
|
||||||
bool tr = ((int)buf.length() > col_d-2) ? true: false;
|
bool tr = ((int)buf.length() > col_d-2) ? true: false;
|
||||||
int pos;
|
int pos;
|
||||||
@ -299,7 +299,7 @@ template<typename _Tp>
|
|||||||
if (tr)
|
if (tr)
|
||||||
{
|
{
|
||||||
pos = buf.find_first_of(' ');
|
pos = buf.find_first_of(' ');
|
||||||
while (true)
|
for(;;)
|
||||||
{
|
{
|
||||||
if ((int)buf.find_first_of(' ', pos + 1 ) < col_d-2 &&
|
if ((int)buf.find_first_of(' ', pos + 1 ) < col_d-2 &&
|
||||||
(int)buf.find_first_of(' ', pos + 1 ) != (int)std::string::npos)
|
(int)buf.find_first_of(' ', pos + 1 ) != (int)std::string::npos)
|
||||||
|
@ -161,9 +161,11 @@ void icvSetOpenGlFuncTab(const CvOpenGlFuncTab* tab)
|
|||||||
void cv::gpu::setGlDevice(int device)
|
void cv::gpu::setGlDevice(int device)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_CUDA
|
#ifndef HAVE_CUDA
|
||||||
|
(void)device;
|
||||||
throw_nocuda;
|
throw_nocuda;
|
||||||
#else
|
#else
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)device;
|
||||||
throw_nogl;
|
throw_nogl;
|
||||||
#else
|
#else
|
||||||
if (!glFuncTab()->isGlContextInitialized())
|
if (!glFuncTab()->isGlContextInitialized())
|
||||||
@ -483,6 +485,7 @@ inline void cv::GlBuffer::Impl::unmapDevice(cudaStream_t stream)
|
|||||||
cv::GlBuffer::GlBuffer(Usage usage) : rows_(0), cols_(0), type_(0), usage_(usage)
|
cv::GlBuffer::GlBuffer(Usage usage) : rows_(0), cols_(0), type_(0), usage_(usage)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)usage;
|
||||||
throw_nogl;
|
throw_nogl;
|
||||||
#else
|
#else
|
||||||
impl_ = Impl::empty();
|
impl_ = Impl::empty();
|
||||||
@ -492,6 +495,10 @@ cv::GlBuffer::GlBuffer(Usage usage) : rows_(0), cols_(0), type_(0), usage_(usage
|
|||||||
cv::GlBuffer::GlBuffer(int rows, int cols, int type, Usage usage) : rows_(0), cols_(0), type_(0), usage_(usage)
|
cv::GlBuffer::GlBuffer(int rows, int cols, int type, Usage usage) : rows_(0), cols_(0), type_(0), usage_(usage)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)rows;
|
||||||
|
(void)cols;
|
||||||
|
(void)type;
|
||||||
|
(void)usage;
|
||||||
throw_nogl;
|
throw_nogl;
|
||||||
#else
|
#else
|
||||||
impl_ = new Impl(rows, cols, type, usage);
|
impl_ = new Impl(rows, cols, type, usage);
|
||||||
@ -504,6 +511,9 @@ cv::GlBuffer::GlBuffer(int rows, int cols, int type, Usage usage) : rows_(0), co
|
|||||||
cv::GlBuffer::GlBuffer(Size size, int type, Usage usage) : rows_(0), cols_(0), type_(0), usage_(usage)
|
cv::GlBuffer::GlBuffer(Size size, int type, Usage usage) : rows_(0), cols_(0), type_(0), usage_(usage)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)size;
|
||||||
|
(void)type;
|
||||||
|
(void)usage;
|
||||||
throw_nogl;
|
throw_nogl;
|
||||||
#else
|
#else
|
||||||
impl_ = new Impl(size.height, size.width, type, usage);
|
impl_ = new Impl(size.height, size.width, type, usage);
|
||||||
@ -516,6 +526,8 @@ cv::GlBuffer::GlBuffer(Size size, int type, Usage usage) : rows_(0), cols_(0), t
|
|||||||
cv::GlBuffer::GlBuffer(InputArray mat_, Usage usage) : rows_(0), cols_(0), type_(0), usage_(usage)
|
cv::GlBuffer::GlBuffer(InputArray mat_, Usage usage) : rows_(0), cols_(0), type_(0), usage_(usage)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)mat_;
|
||||||
|
(void)usage;
|
||||||
throw_nogl;
|
throw_nogl;
|
||||||
#else
|
#else
|
||||||
int kind = mat_.kind();
|
int kind = mat_.kind();
|
||||||
@ -547,6 +559,10 @@ cv::GlBuffer::GlBuffer(InputArray mat_, Usage usage) : rows_(0), cols_(0), type_
|
|||||||
void cv::GlBuffer::create(int rows, int cols, int type, Usage usage)
|
void cv::GlBuffer::create(int rows, int cols, int type, Usage usage)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)rows;
|
||||||
|
(void)cols;
|
||||||
|
(void)type;
|
||||||
|
(void)usage;
|
||||||
throw_nogl;
|
throw_nogl;
|
||||||
#else
|
#else
|
||||||
if (rows_ != rows || cols_ != cols || type_ != type || usage_ != usage)
|
if (rows_ != rows || cols_ != cols || type_ != type || usage_ != usage)
|
||||||
@ -572,6 +588,7 @@ void cv::GlBuffer::release()
|
|||||||
void cv::GlBuffer::copyFrom(InputArray mat_)
|
void cv::GlBuffer::copyFrom(InputArray mat_)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)mat_;
|
||||||
throw_nogl;
|
throw_nogl;
|
||||||
#else
|
#else
|
||||||
int kind = mat_.kind();
|
int kind = mat_.kind();
|
||||||
@ -910,6 +927,9 @@ cv::GlTexture::GlTexture() : rows_(0), cols_(0), type_(0)
|
|||||||
cv::GlTexture::GlTexture(int rows, int cols, int type) : rows_(0), cols_(0), type_(0)
|
cv::GlTexture::GlTexture(int rows, int cols, int type) : rows_(0), cols_(0), type_(0)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)rows;
|
||||||
|
(void)cols;
|
||||||
|
(void)type;
|
||||||
throw_nogl;
|
throw_nogl;
|
||||||
#else
|
#else
|
||||||
impl_ = new Impl(rows, cols, type);
|
impl_ = new Impl(rows, cols, type);
|
||||||
@ -922,6 +942,8 @@ cv::GlTexture::GlTexture(int rows, int cols, int type) : rows_(0), cols_(0), typ
|
|||||||
cv::GlTexture::GlTexture(Size size, int type) : rows_(0), cols_(0), type_(0)
|
cv::GlTexture::GlTexture(Size size, int type) : rows_(0), cols_(0), type_(0)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)size;
|
||||||
|
(void)type;
|
||||||
throw_nogl;
|
throw_nogl;
|
||||||
#else
|
#else
|
||||||
impl_ = new Impl(size.height, size.width, type);
|
impl_ = new Impl(size.height, size.width, type);
|
||||||
@ -934,6 +956,8 @@ cv::GlTexture::GlTexture(Size size, int type) : rows_(0), cols_(0), type_(0)
|
|||||||
cv::GlTexture::GlTexture(InputArray mat_, bool bgra) : rows_(0), cols_(0), type_(0)
|
cv::GlTexture::GlTexture(InputArray mat_, bool bgra) : rows_(0), cols_(0), type_(0)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)mat_;
|
||||||
|
(void)bgra;
|
||||||
throw_nogl;
|
throw_nogl;
|
||||||
#else
|
#else
|
||||||
int kind = mat_.kind();
|
int kind = mat_.kind();
|
||||||
@ -977,6 +1001,9 @@ cv::GlTexture::GlTexture(InputArray mat_, bool bgra) : rows_(0), cols_(0), type_
|
|||||||
void cv::GlTexture::create(int rows, int cols, int type)
|
void cv::GlTexture::create(int rows, int cols, int type)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)rows;
|
||||||
|
(void)cols;
|
||||||
|
(void)type;
|
||||||
throw_nogl;
|
throw_nogl;
|
||||||
#else
|
#else
|
||||||
if (rows_ != rows || cols_ != cols || type_ != type)
|
if (rows_ != rows || cols_ != cols || type_ != type)
|
||||||
@ -1001,6 +1028,8 @@ void cv::GlTexture::release()
|
|||||||
void cv::GlTexture::copyFrom(InputArray mat_, bool bgra)
|
void cv::GlTexture::copyFrom(InputArray mat_, bool bgra)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)mat_;
|
||||||
|
(void)bgra;
|
||||||
throw_nogl;
|
throw_nogl;
|
||||||
#else
|
#else
|
||||||
int kind = mat_.kind();
|
int kind = mat_.kind();
|
||||||
@ -1229,6 +1258,8 @@ cv::GlFont::GlFont(const string& family, int height, Weight weight, Style style)
|
|||||||
void cv::GlFont::draw(const char* str, int len) const
|
void cv::GlFont::draw(const char* str, int len) const
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)str;
|
||||||
|
(void)len;
|
||||||
throw_nogl;
|
throw_nogl;
|
||||||
#else
|
#else
|
||||||
if (base_ && len > 0)
|
if (base_ && len > 0)
|
||||||
@ -1271,6 +1302,10 @@ namespace
|
|||||||
Ptr<GlFont> cv::GlFont::get(const std::string& family, int height, Weight weight, Style style)
|
Ptr<GlFont> cv::GlFont::get(const std::string& family, int height, Weight weight, Style style)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)family;
|
||||||
|
(void)height;
|
||||||
|
(void)weight;
|
||||||
|
(void)style;
|
||||||
throw_nogl;
|
throw_nogl;
|
||||||
return Ptr<GlFont>();
|
return Ptr<GlFont>();
|
||||||
#else
|
#else
|
||||||
@ -1296,6 +1331,9 @@ Ptr<GlFont> cv::GlFont::get(const std::string& family, int height, Weight weight
|
|||||||
void cv::render(const GlTexture& tex, Rect_<double> wndRect, Rect_<double> texRect)
|
void cv::render(const GlTexture& tex, Rect_<double> wndRect, Rect_<double> texRect)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)tex;
|
||||||
|
(void)wndRect;
|
||||||
|
(void)texRect;
|
||||||
throw_nogl;
|
throw_nogl;
|
||||||
#else
|
#else
|
||||||
if (!tex.empty())
|
if (!tex.empty())
|
||||||
@ -1328,6 +1366,9 @@ void cv::render(const GlTexture& tex, Rect_<double> wndRect, Rect_<double> texRe
|
|||||||
void cv::render(const GlArrays& arr, int mode, Scalar color)
|
void cv::render(const GlArrays& arr, int mode, Scalar color)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)arr;
|
||||||
|
(void)mode;
|
||||||
|
(void)color;
|
||||||
throw_nogl;
|
throw_nogl;
|
||||||
#else
|
#else
|
||||||
glColor3d(color[0] / 255.0, color[1] / 255.0, color[2] / 255.0);
|
glColor3d(color[0] / 255.0, color[1] / 255.0, color[2] / 255.0);
|
||||||
@ -1343,6 +1384,10 @@ void cv::render(const GlArrays& arr, int mode, Scalar color)
|
|||||||
void cv::render(const string& str, const Ptr<GlFont>& font, Scalar color, Point2d pos)
|
void cv::render(const string& str, const Ptr<GlFont>& font, Scalar color, Point2d pos)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)str;
|
||||||
|
(void)font;
|
||||||
|
(void)color;
|
||||||
|
(void)pos;
|
||||||
throw_nogl;
|
throw_nogl;
|
||||||
#else
|
#else
|
||||||
glPushAttrib(GL_DEPTH_BUFFER_BIT);
|
glPushAttrib(GL_DEPTH_BUFFER_BIT);
|
||||||
@ -1497,6 +1542,9 @@ void cv::GlCamera::setupModelViewMatrix() const
|
|||||||
bool icvCheckGlError(const char* file, const int line, const char* func)
|
bool icvCheckGlError(const char* file, const int line, const char* func)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)file;
|
||||||
|
(void)line;
|
||||||
|
(void)func;
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
GLenum err = glGetError();
|
GLenum err = glGetError();
|
||||||
|
@ -82,7 +82,7 @@ private:
|
|||||||
void print_information(int right, int result);
|
void print_information(int right, int result);
|
||||||
};
|
};
|
||||||
|
|
||||||
CV_CountNonZeroTest::CV_CountNonZeroTest(): eps_32(1e-8), eps_64(1e-16), src(Mat()), current_type(-1) {}
|
CV_CountNonZeroTest::CV_CountNonZeroTest(): eps_32(1e-8f), eps_64(1e-16f), src(Mat()), current_type(-1) {}
|
||||||
CV_CountNonZeroTest::~CV_CountNonZeroTest() {}
|
CV_CountNonZeroTest::~CV_CountNonZeroTest() {}
|
||||||
|
|
||||||
void CV_CountNonZeroTest::generate_src_data(cv::Size size, int type)
|
void CV_CountNonZeroTest::generate_src_data(cv::Size size, int type)
|
||||||
|
@ -165,7 +165,7 @@ void Core_EigenTest_Scalar_64::run(int)
|
|||||||
void Core_EigenTest_32::run(int) { check_full(CV_32FC1); }
|
void Core_EigenTest_32::run(int) { check_full(CV_32FC1); }
|
||||||
void Core_EigenTest_64::run(int) { check_full(CV_64FC1); }
|
void Core_EigenTest_64::run(int) { check_full(CV_64FC1); }
|
||||||
|
|
||||||
Core_EigenTest::Core_EigenTest() : eps_val_32(1e-3), eps_vec_32(1e-2), eps_val_64(1e-4), eps_vec_64(1e-3) {}
|
Core_EigenTest::Core_EigenTest() : eps_val_32(1e-3f), eps_vec_32(1e-2f), eps_val_64(1e-4f), eps_vec_64(1e-3f) {}
|
||||||
Core_EigenTest::~Core_EigenTest() {}
|
Core_EigenTest::~Core_EigenTest() {}
|
||||||
|
|
||||||
bool Core_EigenTest::check_pair_count(const cv::Mat& src, const cv::Mat& evalues, int low_index, int high_index)
|
bool Core_EigenTest::check_pair_count(const cv::Mat& src, const cv::Mat& evalues, int low_index, int high_index)
|
||||||
@ -387,7 +387,7 @@ bool Core_EigenTest::check_full(int type)
|
|||||||
const int MATRIX_COUNT = 500;
|
const int MATRIX_COUNT = 500;
|
||||||
const int MAX_DEGREE = 7;
|
const int MAX_DEGREE = 7;
|
||||||
|
|
||||||
srand(time(0));
|
srand((unsigned int)time(0));
|
||||||
|
|
||||||
for (int i = 1; i <= MATRIX_COUNT; ++i)
|
for (int i = 1; i <= MATRIX_COUNT; ++i)
|
||||||
{
|
{
|
||||||
|
@ -280,7 +280,7 @@ void cv::FAST(const Mat& img, std::vector<KeyPoint>& keypoints, int threshold, b
|
|||||||
{
|
{
|
||||||
cornerpos[ncorners++] = j+k;
|
cornerpos[ncorners++] = j+k;
|
||||||
if(nonmax_suppression)
|
if(nonmax_suppression)
|
||||||
curr[j+k] = cornerScore(ptr+k, pixel, threshold);
|
curr[j+k] = (uchar)cornerScore(ptr+k, pixel, threshold);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -318,7 +318,7 @@ void cv::FAST(const Mat& img, std::vector<KeyPoint>& keypoints, int threshold, b
|
|||||||
{
|
{
|
||||||
cornerpos[ncorners++] = j;
|
cornerpos[ncorners++] = j;
|
||||||
if(nonmax_suppression)
|
if(nonmax_suppression)
|
||||||
curr[j] = cornerScore(ptr, pixel, threshold);
|
curr[j] = (uchar)cornerScore(ptr, pixel, threshold);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -340,7 +340,7 @@ void cv::FAST(const Mat& img, std::vector<KeyPoint>& keypoints, int threshold, b
|
|||||||
{
|
{
|
||||||
cornerpos[ncorners++] = j;
|
cornerpos[ncorners++] = j;
|
||||||
if(nonmax_suppression)
|
if(nonmax_suppression)
|
||||||
curr[j] = cornerScore(ptr, pixel, threshold);
|
curr[j] = (uchar)cornerScore(ptr, pixel, threshold);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -974,7 +974,7 @@ void ORB::computeKeyPoints(const vector<Mat>& image_pyramid,
|
|||||||
* @param scale the scale at which we compute the orientation
|
* @param scale the scale at which we compute the orientation
|
||||||
* @param keypoints the resulting keypoints
|
* @param keypoints the resulting keypoints
|
||||||
*/
|
*/
|
||||||
void ORB::computeOrientation(const Mat& image, const Mat&, unsigned int scale,
|
void ORB::computeOrientation(const Mat& image, const Mat&, unsigned int /*scale*/,
|
||||||
vector<KeyPoint>& keypoints) const
|
vector<KeyPoint>& keypoints) const
|
||||||
{
|
{
|
||||||
int half_patch_size = params_.patch_size_/2;
|
int half_patch_size = params_.patch_size_/2;
|
||||||
@ -1003,7 +1003,7 @@ void ORB::computeIntegralImage(const Mat&, unsigned int, Mat&)
|
|||||||
* @param keypoints the keypoints to use
|
* @param keypoints the keypoints to use
|
||||||
* @param descriptors the resulting descriptors
|
* @param descriptors the resulting descriptors
|
||||||
*/
|
*/
|
||||||
void ORB::computeDescriptors(const Mat& image, const Mat& integral_image, unsigned int,
|
void ORB::computeDescriptors(const Mat& image, const Mat& /*integral_image*/, unsigned int,
|
||||||
vector<KeyPoint>& keypoints, Mat& descriptors) const
|
vector<KeyPoint>& keypoints, Mat& descriptors) const
|
||||||
{
|
{
|
||||||
//convert to grayscale if more than one color
|
//convert to grayscale if more than one color
|
||||||
|
@ -119,7 +119,7 @@ public:
|
|||||||
dists_ptr = dists[0];
|
dists_ptr = dists[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
RadiusUniqueResultSet<DistanceType> resultSet(radius);
|
RadiusUniqueResultSet<DistanceType> resultSet((DistanceType)radius);
|
||||||
resultSet.clear();
|
resultSet.clear();
|
||||||
findNeighbors(resultSet, query[0], params);
|
findNeighbors(resultSet, query[0], params);
|
||||||
if (n>0) {
|
if (n>0) {
|
||||||
|
@ -1664,7 +1664,7 @@ private:
|
|||||||
GpuMat pattern_;
|
GpuMat pattern_;
|
||||||
|
|
||||||
std::vector<GpuMat> imagePyr_;
|
std::vector<GpuMat> imagePyr_;
|
||||||
std::vector<GpuMat> maskPyr_;
|
cv::Ptr<std::vector<GpuMat>> maskPyr_;
|
||||||
|
|
||||||
GpuMat buf_;
|
GpuMat buf_;
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ void cv::gpu::GoodFeaturesToTrackDetector_GPU::operator ()(const GpuMat& image,
|
|||||||
|
|
||||||
if (!m.empty())
|
if (!m.empty())
|
||||||
{
|
{
|
||||||
for(int j = 0; j < m.size(); j++)
|
for(size_t j = 0; j < m.size(); j++)
|
||||||
{
|
{
|
||||||
float dx = p.x - m[j].x;
|
float dx = p.x - m[j].x;
|
||||||
float dy = p.y - m[j].y;
|
float dy = p.y - m[j].y;
|
||||||
|
@ -493,7 +493,7 @@ void cv::gpu::ORB_GPU::buildScalePyramids(const GpuMat& image, const GpuMat& mas
|
|||||||
CV_Assert(mask.empty() || (mask.type() == CV_8UC1 && mask.size() == image.size()));
|
CV_Assert(mask.empty() || (mask.type() == CV_8UC1 && mask.size() == image.size()));
|
||||||
|
|
||||||
imagePyr_.resize(params_.n_levels_);
|
imagePyr_.resize(params_.n_levels_);
|
||||||
maskPyr_.resize(params_.n_levels_);
|
maskPyr_->resize(params_.n_levels_);
|
||||||
|
|
||||||
for (int level = 0; level < static_cast<int>(params_.n_levels_); ++level)
|
for (int level = 0; level < static_cast<int>(params_.n_levels_); ++level)
|
||||||
{
|
{
|
||||||
@ -502,8 +502,8 @@ void cv::gpu::ORB_GPU::buildScalePyramids(const GpuMat& image, const GpuMat& mas
|
|||||||
Size sz(cvRound(image.cols * scale), cvRound(image.rows * scale));
|
Size sz(cvRound(image.cols * scale), cvRound(image.rows * scale));
|
||||||
|
|
||||||
ensureSizeIsEnough(sz, image.type(), imagePyr_[level]);
|
ensureSizeIsEnough(sz, image.type(), imagePyr_[level]);
|
||||||
ensureSizeIsEnough(sz, CV_8UC1, maskPyr_[level]);
|
ensureSizeIsEnough(sz, CV_8UC1, (*maskPyr_)[level]);
|
||||||
maskPyr_[level].setTo(Scalar::all(255));
|
(*maskPyr_)[level].setTo(Scalar::all(255));
|
||||||
|
|
||||||
// Compute the resized image
|
// Compute the resized image
|
||||||
if (level != static_cast<int>(params_.first_level_))
|
if (level != static_cast<int>(params_.first_level_))
|
||||||
@ -528,7 +528,7 @@ void cv::gpu::ORB_GPU::buildScalePyramids(const GpuMat& image, const GpuMat& mas
|
|||||||
image.copyTo(imagePyr_[level]);
|
image.copyTo(imagePyr_[level]);
|
||||||
|
|
||||||
if (!mask.empty())
|
if (!mask.empty())
|
||||||
mask.copyTo(maskPyr_[level]);
|
mask.copyTo((*maskPyr_)[level]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter keypoints by image border
|
// Filter keypoints by image border
|
||||||
@ -537,7 +537,7 @@ void cv::gpu::ORB_GPU::buildScalePyramids(const GpuMat& image, const GpuMat& mas
|
|||||||
Rect inner(params_.edge_threshold_, params_.edge_threshold_, sz.width - 2 * params_.edge_threshold_, sz.height - 2 * params_.edge_threshold_);
|
Rect inner(params_.edge_threshold_, params_.edge_threshold_, sz.width - 2 * params_.edge_threshold_, sz.height - 2 * params_.edge_threshold_);
|
||||||
buf_(inner).setTo(Scalar::all(255));
|
buf_(inner).setTo(Scalar::all(255));
|
||||||
|
|
||||||
bitwise_and(maskPyr_[level], buf_, maskPyr_[level]);
|
bitwise_and((*maskPyr_)[level], buf_, (*maskPyr_)[level]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -573,7 +573,7 @@ void cv::gpu::ORB_GPU::computeKeyPointsPyramid()
|
|||||||
|
|
||||||
for (int level = 0; level < static_cast<int>(params_.n_levels_); ++level)
|
for (int level = 0; level < static_cast<int>(params_.n_levels_); ++level)
|
||||||
{
|
{
|
||||||
keyPointsCount_[level] = fastDetector_.calcKeyPointsLocation(imagePyr_[level], maskPyr_[level]);
|
keyPointsCount_[level] = fastDetector_.calcKeyPointsLocation(imagePyr_[level], (*maskPyr_)[level]);
|
||||||
|
|
||||||
ensureSizeIsEnough(3, keyPointsCount_[level], CV_32FC1, keyPointsPyr_[level]);
|
ensureSizeIsEnough(3, keyPointsCount_[level], CV_32FC1, keyPointsPyr_[level]);
|
||||||
|
|
||||||
@ -752,7 +752,7 @@ void cv::gpu::ORB_GPU::operator()(const GpuMat& image, const GpuMat& mask, std::
|
|||||||
void cv::gpu::ORB_GPU::release()
|
void cv::gpu::ORB_GPU::release()
|
||||||
{
|
{
|
||||||
imagePyr_.clear();
|
imagePyr_.clear();
|
||||||
maskPyr_.clear();
|
maskPyr_->clear();
|
||||||
|
|
||||||
buf_.release();
|
buf_.release();
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ TEST_P(BruteForceMatcher, MatchAdd)
|
|||||||
cv::DMatch match = matches[i];
|
cv::DMatch match = matches[i];
|
||||||
int shift = isMaskSupported ? 1 : 0;
|
int shift = isMaskSupported ? 1 : 0;
|
||||||
{
|
{
|
||||||
if (i < queryDescCount / 2)
|
if ((int)i < queryDescCount / 2)
|
||||||
{
|
{
|
||||||
if ((match.queryIdx != (int)i) || (match.trainIdx != (int)i * countFactor + shift) || (match.imgIdx != 0))
|
if ((match.queryIdx != (int)i) || (match.trainIdx != (int)i * countFactor + shift) || (match.imgIdx != 0))
|
||||||
badCount++;
|
badCount++;
|
||||||
@ -390,7 +390,7 @@ TEST_P(BruteForceMatcher, KnnMatchAdd2)
|
|||||||
{
|
{
|
||||||
cv::DMatch match = matches[i][k];
|
cv::DMatch match = matches[i][k];
|
||||||
{
|
{
|
||||||
if (i < queryDescCount / 2)
|
if ((int)i < queryDescCount / 2)
|
||||||
{
|
{
|
||||||
if ((match.queryIdx != (int)i) || (match.trainIdx != (int)i * countFactor + k + shift) || (match.imgIdx != 0) )
|
if ((match.queryIdx != (int)i) || (match.trainIdx != (int)i * countFactor + k + shift) || (match.imgIdx != 0) )
|
||||||
localBadCount++;
|
localBadCount++;
|
||||||
@ -452,7 +452,7 @@ TEST_P(BruteForceMatcher, KnnMatchAdd3)
|
|||||||
{
|
{
|
||||||
cv::DMatch match = matches[i][k];
|
cv::DMatch match = matches[i][k];
|
||||||
{
|
{
|
||||||
if (i < queryDescCount / 2)
|
if ((int)i < queryDescCount / 2)
|
||||||
{
|
{
|
||||||
if ((match.queryIdx != (int)i) || (match.trainIdx != (int)i * countFactor + k + shift) || (match.imgIdx != 0) )
|
if ((match.queryIdx != (int)i) || (match.trainIdx != (int)i * countFactor + k + shift) || (match.imgIdx != 0) )
|
||||||
localBadCount++;
|
localBadCount++;
|
||||||
@ -552,7 +552,7 @@ TEST_P(BruteForceMatcher, RadiusMatchAdd)
|
|||||||
{
|
{
|
||||||
cv::DMatch match = matches[i][k];
|
cv::DMatch match = matches[i][k];
|
||||||
{
|
{
|
||||||
if (i < queryDescCount / 2)
|
if ((int)i < queryDescCount / 2)
|
||||||
{
|
{
|
||||||
if ((match.queryIdx != (int)i) || (match.trainIdx != (int)i * countFactor + k + shift) || (match.imgIdx != 0) )
|
if ((match.queryIdx != (int)i) || (match.trainIdx != (int)i * countFactor + k + shift) || (match.imgIdx != 0) )
|
||||||
localBadCount++;
|
localBadCount++;
|
||||||
|
@ -401,7 +401,7 @@ double CvCapture_OpenNI::getDepthGeneratorProperty( int propIdx )
|
|||||||
res = baseline;
|
res = baseline;
|
||||||
break;
|
break;
|
||||||
case CV_CAP_PROP_OPENNI_FOCAL_LENGTH :
|
case CV_CAP_PROP_OPENNI_FOCAL_LENGTH :
|
||||||
res = depthFocalLength_VGA;
|
res = (double)depthFocalLength_VGA;
|
||||||
break;
|
break;
|
||||||
case CV_CAP_PROP_OPENNI_REGISTRATION :
|
case CV_CAP_PROP_OPENNI_REGISTRATION :
|
||||||
res = depthGenerator.GetAlternativeViewPointCap().IsViewPointAs(imageGenerator) ? 1.0 : 0.0;
|
res = depthGenerator.GetAlternativeViewPointCap().IsViewPointAs(imageGenerator) ? 1.0 : 0.0;
|
||||||
@ -552,7 +552,7 @@ inline void getDepthMapFromMetaData( const xn::DepthMetaData& depthMetaData, cv:
|
|||||||
// CV_Assert( sizeof(unsigned short) == sizeof(XnDepthPixel) );
|
// CV_Assert( sizeof(unsigned short) == sizeof(XnDepthPixel) );
|
||||||
memcpy( depthMap.data, pDepthMap, cols*rows*sizeof(XnDepthPixel) );
|
memcpy( depthMap.data, pDepthMap, cols*rows*sizeof(XnDepthPixel) );
|
||||||
|
|
||||||
cv::Mat badMask = (depthMap == noSampleValue) | (depthMap == shadowValue) | (depthMap == 0);
|
cv::Mat badMask = (depthMap == (double)noSampleValue) | (depthMap == (double)shadowValue) | (depthMap == 0);
|
||||||
|
|
||||||
// mask the pixels with invalid depth
|
// mask the pixels with invalid depth
|
||||||
depthMap.setTo( cv::Scalar::all( CvCapture_OpenNI::INVALID_PIXEL_VAL ), badMask );
|
depthMap.setTo( cv::Scalar::all( CvCapture_OpenNI::INVALID_PIXEL_VAL ), badMask );
|
||||||
@ -588,8 +588,8 @@ IplImage* CvCapture_OpenNI::retrievePointCloudMap()
|
|||||||
for( int x = 0; x < cols; x++ )
|
for( int x = 0; x < cols; x++ )
|
||||||
{
|
{
|
||||||
int ind = y*cols+x;
|
int ind = y*cols+x;
|
||||||
proj[ind].X = x;
|
proj[ind].X = (float)x;
|
||||||
proj[ind].Y = y;
|
proj[ind].Y = (float)y;
|
||||||
proj[ind].Z = depth.at<unsigned short>(y, x);
|
proj[ind].Z = depth.at<unsigned short>(y, x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -625,7 +625,7 @@ void computeDisparity_32F( const xn::DepthMetaData& depthMetaData, cv::Mat& disp
|
|||||||
|
|
||||||
// disparity = baseline * F / z;
|
// disparity = baseline * F / z;
|
||||||
|
|
||||||
float mult = baseline /*mm*/ * F /*pixels*/;
|
float mult = (float)(baseline /*mm*/ * F /*pixels*/);
|
||||||
|
|
||||||
disp.create( depth.size(), CV_32FC1);
|
disp.create( depth.size(), CV_32FC1);
|
||||||
disp = cv::Scalar::all( CvCapture_OpenNI::INVALID_PIXEL_VAL );
|
disp = cv::Scalar::all( CvCapture_OpenNI::INVALID_PIXEL_VAL );
|
||||||
|
@ -393,6 +393,9 @@ void cv::pointCloudShow(const string& winname, const GlCamera& camera, const GlA
|
|||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
CV_Error(CV_OpenGlNotSupported, "The library is compiled without OpenGL support");
|
CV_Error(CV_OpenGlNotSupported, "The library is compiled without OpenGL support");
|
||||||
|
(void)winname;
|
||||||
|
(void)camera;
|
||||||
|
(void)arr;
|
||||||
#else
|
#else
|
||||||
namedWindow(winname, WINDOW_OPENGL);
|
namedWindow(winname, WINDOW_OPENGL);
|
||||||
|
|
||||||
@ -436,6 +439,10 @@ void cv::pointCloudShow(const string& winname, const GlCamera& camera, const GlA
|
|||||||
void cv::pointCloudShow(const std::string& winname, const cv::GlCamera& camera, InputArray points, InputArray colors)
|
void cv::pointCloudShow(const std::string& winname, const cv::GlCamera& camera, InputArray points, InputArray colors)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_OPENGL
|
#ifndef HAVE_OPENGL
|
||||||
|
(void)winname;
|
||||||
|
(void)camera;
|
||||||
|
(void)points;
|
||||||
|
(void)colors;
|
||||||
CV_Error(CV_OpenGlNotSupported, "The library is compiled without OpenGL support");
|
CV_Error(CV_OpenGlNotSupported, "The library is compiled without OpenGL support");
|
||||||
#else
|
#else
|
||||||
namedWindow(winname, WINDOW_OPENGL);
|
namedWindow(winname, WINDOW_OPENGL);
|
||||||
|
@ -560,6 +560,7 @@ double cvGetOpenGlProp_W32(const char* name)
|
|||||||
|
|
||||||
__END__;
|
__END__;
|
||||||
#endif
|
#endif
|
||||||
|
(void)name;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ PERF_TEST_P( TestFilter2d, Filter2d,
|
|||||||
|
|
||||||
Mat kernel(kSize, kSize, CV_32FC1);
|
Mat kernel(kSize, kSize, CV_32FC1);
|
||||||
randu(kernel, -3, 10);
|
randu(kernel, -3, 10);
|
||||||
float s = fabs( sum(kernel)[0] );
|
float s = (float)fabs( sum(kernel)[0] );
|
||||||
if(s > 1e-3) kernel /= s;
|
if(s > 1e-3) kernel /= s;
|
||||||
|
|
||||||
declare.in(src, WARMUP_RNG).out(dst).time(20);
|
declare.in(src, WARMUP_RNG).out(dst).time(20);
|
||||||
|
@ -60,12 +60,12 @@ cv::Mat cv::getGaborKernel( Size ksize, double sigma, double theta,
|
|||||||
if( ksize.width > 0 )
|
if( ksize.width > 0 )
|
||||||
xmax = ksize.width/2;
|
xmax = ksize.width/2;
|
||||||
else
|
else
|
||||||
xmax = std::max(fabs(nstds*sigma_x*c), fabs(nstds*sigma_y*s));
|
xmax = (int)std::max(fabs(nstds*sigma_x*c), fabs(nstds*sigma_y*s));
|
||||||
|
|
||||||
if( ksize.height > 0 )
|
if( ksize.height > 0 )
|
||||||
ymax = ksize.height/2;
|
ymax = ksize.height/2;
|
||||||
else
|
else
|
||||||
ymax = std::max(fabs(nstds*sigma_x*s), fabs(nstds*sigma_y*c));
|
ymax = (int)std::max(fabs(nstds*sigma_x*s), fabs(nstds*sigma_y*c));
|
||||||
|
|
||||||
xmin = -xmax;
|
xmin = -xmax;
|
||||||
ymin = -ymax;
|
ymin = -ymax;
|
||||||
|
@ -439,8 +439,8 @@ static char segSegInt( Point2f a, Point2f b, Point2f c, Point2f d, Point2f& p, P
|
|||||||
(0.0 > t) || (t > 1.0) )
|
(0.0 > t) || (t > 1.0) )
|
||||||
code = '0';
|
code = '0';
|
||||||
|
|
||||||
p.x = a.x + s * ( b.x - a.x );
|
p.x = (float)(a.x + s * ( b.x - a.x ));
|
||||||
p.y = a.y + s * ( b.y - a.y );
|
p.y = (float)(a.y + s * ( b.y - a.y ));
|
||||||
|
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
@ -652,7 +652,7 @@ float cv::intersectConvexConvex( InputArray _p1, InputArray _p2, OutputArray _p1
|
|||||||
_p12.release();
|
_p12.release();
|
||||||
return 0.f;
|
return 0.f;
|
||||||
}
|
}
|
||||||
area = contourArea(_InputArray(result, nr), false);
|
area = (float)contourArea(_InputArray(result, nr), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( _p12.needed() )
|
if( _p12.needed() )
|
||||||
|
@ -1074,10 +1074,8 @@ public:
|
|||||||
{
|
{
|
||||||
int row0 = min(cvRound(range.begin() * src.rows / nStripes), src.rows);
|
int row0 = min(cvRound(range.begin() * src.rows / nStripes), src.rows);
|
||||||
int row1 = min(cvRound(range.end() * src.rows / nStripes), src.rows);
|
int row1 = min(cvRound(range.end() * src.rows / nStripes), src.rows);
|
||||||
|
|
||||||
if(0)
|
//printf("Size = (%d, %d), range[%d,%d), row0 = %d, row1 = %d\n", src.rows, src.cols, range.begin(), range.end(), row0, row1);
|
||||||
printf("Size = (%d, %d), range[%d,%d), row0 = %d, row1 = %d\n",
|
|
||||||
src.rows, src.cols, range.begin(), range.end(), row0, row1);
|
|
||||||
|
|
||||||
Mat srcStripe = src.rowRange(row0, row1);
|
Mat srcStripe = src.rowRange(row0, row1);
|
||||||
Mat dstStripe = dst.rowRange(row0, row1);
|
Mat dstStripe = dst.rowRange(row0, row1);
|
||||||
@ -1102,6 +1100,9 @@ private:
|
|||||||
int rowBorderType;
|
int rowBorderType;
|
||||||
int columnBorderType;
|
int columnBorderType;
|
||||||
const Scalar& borderValue;
|
const Scalar& borderValue;
|
||||||
|
|
||||||
|
MorphologyRunner(const MorphologyRunner&);
|
||||||
|
MorphologyRunner& operator=(const MorphologyRunner&);
|
||||||
};
|
};
|
||||||
|
|
||||||
static void morphOp( int op, InputArray _src, OutputArray _dst,
|
static void morphOp( int op, InputArray _src, OutputArray _dst,
|
||||||
|
@ -682,10 +682,8 @@ public:
|
|||||||
{
|
{
|
||||||
int row0 = std::min(cvRound(range.begin() * src.rows / nStripes), src.rows);
|
int row0 = std::min(cvRound(range.begin() * src.rows / nStripes), src.rows);
|
||||||
int row1 = std::min(cvRound(range.end() * src.rows / nStripes), src.rows);
|
int row1 = std::min(cvRound(range.end() * src.rows / nStripes), src.rows);
|
||||||
|
|
||||||
if(0)
|
//printf("Size = (%d, %d), range[%d,%d), row0 = %d, row1 = %d\n", src.rows, src.cols, range.begin(), range.end(), row0, row1);
|
||||||
printf("Size = (%d, %d), range[%d,%d), row0 = %d, row1 = %d\n",
|
|
||||||
src.rows, src.cols, range.begin(), range.end(), row0, row1);
|
|
||||||
|
|
||||||
Mat srcStripe = src.rowRange(row0, row1);
|
Mat srcStripe = src.rowRange(row0, row1);
|
||||||
Mat dstStripe = dst.rowRange(row0, row1);
|
Mat dstStripe = dst.rowRange(row0, row1);
|
||||||
|
@ -62,18 +62,21 @@
|
|||||||
} while(0);
|
} while(0);
|
||||||
#else
|
#else
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#define LOG_STITCHING_MSG(msg) do { std::cout << msg; std::cout.flush(); } while(0);
|
#define LOG_STITCHING_MSG(msg) for(;;) { std::cout << msg; std::cout.flush(); break; }
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define LOG_STITCHING_MSG(msg)
|
#define LOG_STITCHING_MSG(msg)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LOG_(_level, _msg) \
|
#define LOG_(_level, _msg) \
|
||||||
do { \
|
for(;;) \
|
||||||
if ((_level) >= ::cv::detail::stitchingLogLevel()) { \
|
{ \
|
||||||
|
if ((_level) >= ::cv::detail::stitchingLogLevel()) \
|
||||||
|
{ \
|
||||||
LOG_STITCHING_MSG(_msg); \
|
LOG_STITCHING_MSG(_msg); \
|
||||||
} \
|
} \
|
||||||
} while(0)
|
break; \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#define LOG(msg) LOG_(1, msg)
|
#define LOG(msg) LOG_(1, msg)
|
||||||
|
@ -87,8 +87,8 @@ PERF_TEST_P( match, bestOf2Nearest, testing::Values("surf", "orb"))
|
|||||||
{
|
{
|
||||||
Mat img1, img1_full = imread( getDataPath("stitching/b1.jpg") );
|
Mat img1, img1_full = imread( getDataPath("stitching/b1.jpg") );
|
||||||
Mat img2, img2_full = imread( getDataPath("stitching/b2.jpg") );
|
Mat img2, img2_full = imread( getDataPath("stitching/b2.jpg") );
|
||||||
float scale1 = std::min(1.0, sqrt(WORK_MEGAPIX * 1e6 / img1_full.total()));
|
float scale1 = (float)std::min(1.0, sqrt(WORK_MEGAPIX * 1e6 / img1_full.total()));
|
||||||
float scale2 = std::min(1.0, sqrt(WORK_MEGAPIX * 1e6 / img2_full.total()));
|
float scale2 = (float)std::min(1.0, sqrt(WORK_MEGAPIX * 1e6 / img2_full.total()));
|
||||||
resize(img1_full, img1, Size(), scale1, scale1);
|
resize(img1_full, img1, Size(), scale1, scale1);
|
||||||
resize(img2_full, img2, Size(), scale2, scale2);
|
resize(img2_full, img2, Size(), scale2, scale2);
|
||||||
|
|
||||||
|
@ -158,6 +158,8 @@ public:
|
|||||||
Impl(int cost_type, float terminal_cost, float bad_region_penalty)
|
Impl(int cost_type, float terminal_cost, float bad_region_penalty)
|
||||||
: cost_type_(cost_type), terminal_cost_(terminal_cost), bad_region_penalty_(bad_region_penalty) {}
|
: cost_type_(cost_type), terminal_cost_(terminal_cost), bad_region_penalty_(bad_region_penalty) {}
|
||||||
|
|
||||||
|
~Impl() {}
|
||||||
|
|
||||||
void find(const vector<Mat> &src, const vector<Point> &corners, vector<Mat> &masks);
|
void find(const vector<Mat> &src, const vector<Point> &corners, vector<Mat> &masks);
|
||||||
void findInPair(size_t first, size_t second, Rect roi);
|
void findInPair(size_t first, size_t second, Rect roi);
|
||||||
|
|
||||||
|
@ -985,6 +985,7 @@ TestBase::_declareHelper& TestBase::_declareHelper::tbb_threads(int n)
|
|||||||
if (n > 0)
|
if (n > 0)
|
||||||
test->p_tbb_initializer=new tbb::task_scheduler_init(n);
|
test->p_tbb_initializer=new tbb::task_scheduler_init(n);
|
||||||
#endif
|
#endif
|
||||||
|
(void)n;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user