Minimize usages of legacy C API inside the library
This commit is contained in:
@@ -507,10 +507,11 @@ The function draws contour outlines in the image if
|
||||
:math:`\texttt{thickness} \ge 0` or fills the area bounded by the contours if
|
||||
:math:`\texttt{thickness}<0` . The example below shows how to retrieve connected components from the binary image and label them: ::
|
||||
|
||||
#include "cv.h"
|
||||
#include "highgui.h"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
|
||||
using namespace cv;
|
||||
using namespace std;
|
||||
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
@@ -530,7 +531,7 @@ The function draws contour outlines in the image if
|
||||
vector<Vec4i> hierarchy;
|
||||
|
||||
findContours( src, contours, hierarchy,
|
||||
CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE );
|
||||
RETR_CCOMP, CHAIN_APPROX_SIMPLE );
|
||||
|
||||
// iterate through all the top-level contours,
|
||||
// draw each connected component with its own random color
|
||||
@@ -538,7 +539,7 @@ The function draws contour outlines in the image if
|
||||
for( ; idx >= 0; idx = hierarchy[idx][0] )
|
||||
{
|
||||
Scalar color( rand()&255, rand()&255, rand()&255 );
|
||||
drawContours( dst, contours, idx, color, CV_FILLED, 8, hierarchy );
|
||||
drawContours( dst, contours, idx, color, FILLED, 8, hierarchy );
|
||||
}
|
||||
|
||||
namedWindow( "Components", 1 );
|
||||
|
@@ -104,8 +104,8 @@ OpenCV deallocates the memory automatically, as well as automatically allocates
|
||||
|
||||
Example: ::
|
||||
|
||||
#include "cv.h"
|
||||
#include "highgui.h"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
|
||||
using namespace cv;
|
||||
|
||||
@@ -119,7 +119,7 @@ Example: ::
|
||||
for(;;)
|
||||
{
|
||||
cap >> frame;
|
||||
cvtColor(frame, edges, CV_BGR2GRAY);
|
||||
cvtColor(frame, edges, COLOR_BGR2GRAY);
|
||||
GaussianBlur(edges, edges, Size(7,7), 1.5, 1.5);
|
||||
Canny(edges, edges, 0, 30, 3);
|
||||
imshow("edges", edges);
|
||||
|
@@ -4,7 +4,6 @@
|
||||
#include <opencv2/gpu.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
#include <opencv2/video.hpp>
|
||||
#include <opencv2/legacy.hpp>
|
||||
#include <opencv2/ts.hpp>
|
||||
|
||||
static void printOsInfo()
|
||||
|
@@ -1305,7 +1305,9 @@ PERF_TEST_P(Sz_3Depth, Core_AddWeighted,
|
||||
// GEMM
|
||||
|
||||
CV_FLAGS(GemmFlags, 0, cv::GEMM_1_T, cv::GEMM_2_T, cv::GEMM_3_T)
|
||||
#define ALL_GEMM_FLAGS Values(0, CV_GEMM_A_T, CV_GEMM_B_T, CV_GEMM_C_T, CV_GEMM_A_T | CV_GEMM_B_T, CV_GEMM_A_T | CV_GEMM_C_T, CV_GEMM_A_T | CV_GEMM_B_T | CV_GEMM_C_T)
|
||||
#define ALL_GEMM_FLAGS Values(0, (int)cv::GEMM_1_T, (int)cv::GEMM_2_T, (int)cv::GEMM_3_T, \
|
||||
(int)cv::GEMM_1_T | cv::GEMM_2_T, (int)cv::GEMM_1_T | cv::GEMM_3_T, \
|
||||
(int)cv::GEMM_1_T | cv::GEMM_2_T | cv::GEMM_3_T)
|
||||
|
||||
DEF_PARAM_TEST(Sz_Type_Flags, cv::Size, MatType, GemmFlags);
|
||||
|
||||
@@ -2071,7 +2073,7 @@ PERF_TEST_P(Sz_Depth, Core_CountNonZero,
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Reduce
|
||||
|
||||
CV_ENUM(ReduceCode, CV_REDUCE_SUM, CV_REDUCE_AVG, CV_REDUCE_MAX, CV_REDUCE_MIN)
|
||||
CV_ENUM(ReduceCode, cv::REDUCE_SUM, cv::REDUCE_AVG, cv::REDUCE_MAX, cv::REDUCE_MIN)
|
||||
#define ALL_REDUCE_CODES ValuesIn(ReduceCode::all())
|
||||
|
||||
enum {Rows = 0, Cols = 1};
|
||||
|
@@ -1794,7 +1794,7 @@ PERF_TEST_P(Sz_Dp_MinDist, ImgProc_HoughCircles,
|
||||
cv::gpu::GpuMat d_circles;
|
||||
cv::gpu::HoughCirclesBuf d_buf;
|
||||
|
||||
TEST_CYCLE() cv::gpu::HoughCircles(d_src, d_circles, d_buf, CV_HOUGH_GRADIENT, dp, minDist, cannyThreshold, votesThreshold, minRadius, maxRadius);
|
||||
TEST_CYCLE() cv::gpu::HoughCircles(d_src, d_circles, d_buf, cv::HOUGH_GRADIENT, dp, minDist, cannyThreshold, votesThreshold, minRadius, maxRadius);
|
||||
|
||||
cv::Mat gpu_circles(d_circles);
|
||||
cv::Vec3f* begin = gpu_circles.ptr<cv::Vec3f>(0);
|
||||
@@ -1806,7 +1806,7 @@ PERF_TEST_P(Sz_Dp_MinDist, ImgProc_HoughCircles,
|
||||
{
|
||||
std::vector<cv::Vec3f> cpu_circles;
|
||||
|
||||
TEST_CYCLE() cv::HoughCircles(src, cpu_circles, CV_HOUGH_GRADIENT, dp, minDist, cannyThreshold, votesThreshold, minRadius, maxRadius);
|
||||
TEST_CYCLE() cv::HoughCircles(src, cpu_circles, cv::HOUGH_GRADIENT, dp, minDist, cannyThreshold, votesThreshold, minRadius, maxRadius);
|
||||
|
||||
SANITY_CHECK(cpu_circles);
|
||||
}
|
||||
|
@@ -63,7 +63,6 @@
|
||||
#include "opencv2/calib3d.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/video.hpp"
|
||||
#include "opencv2/legacy.hpp"
|
||||
#include "opencv2/photo.hpp"
|
||||
|
||||
#include "opencv2/core/gpu_private.hpp"
|
||||
|
@@ -41,6 +41,7 @@
|
||||
//M*/
|
||||
|
||||
#include "perf_precomp.hpp"
|
||||
#include "opencv2/legacy.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace testing;
|
||||
|
@@ -49,7 +49,6 @@
|
||||
#include "opencv2/gpu.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
#include "opencv2/video.hpp"
|
||||
#include "opencv2/legacy.hpp"
|
||||
#include "opencv2/ts.hpp"
|
||||
#include "opencv2/ts/gpu_perf.hpp"
|
||||
|
||||
|
@@ -73,7 +73,6 @@
|
||||
#include "opencv2/ts.hpp"
|
||||
#include "opencv2/ts/gpu_test.hpp"
|
||||
#include "opencv2/gpu.hpp"
|
||||
#include "opencv2/legacy.hpp"
|
||||
|
||||
#include "interpolation.hpp"
|
||||
#include "main_test_nvidia.h"
|
||||
|
@@ -306,8 +306,8 @@ The function finds circles in a grayscale image using a modification of the Houg
|
||||
|
||||
Example: ::
|
||||
|
||||
#include <cv.h>
|
||||
#include <highgui.h>
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
#include <math.h>
|
||||
|
||||
using namespace cv;
|
||||
@@ -317,11 +317,11 @@ Example: ::
|
||||
Mat img, gray;
|
||||
if( argc != 2 && !(img=imread(argv[1], 1)).data)
|
||||
return -1;
|
||||
cvtColor(img, gray, CV_BGR2GRAY);
|
||||
cvtColor(img, gray, COLOR_BGR2GRAY);
|
||||
// smooth it, otherwise a lot of false circles may be detected
|
||||
GaussianBlur( gray, gray, Size(9, 9), 2, 2 );
|
||||
vector<Vec3f> circles;
|
||||
HoughCircles(gray, circles, CV_HOUGH_GRADIENT,
|
||||
HoughCircles(gray, circles, HOUGH_GRADIENT,
|
||||
2, gray->rows/4, 200, 100 );
|
||||
for( size_t i = 0; i < circles.size(); i++ )
|
||||
{
|
||||
@@ -426,9 +426,8 @@ The function implements the probabilistic Hough transform algorithm for line det
|
||||
/* This is a standalone program. Pass an image name as the first parameter
|
||||
of the program. Switch between standard and probabilistic Hough transform
|
||||
by changing "#if 1" to "#if 0" and back */
|
||||
#include <cv.h>
|
||||
#include <highgui.h>
|
||||
#include <math.h>
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
|
||||
using namespace cv;
|
||||
|
||||
@@ -439,7 +438,7 @@ The function implements the probabilistic Hough transform algorithm for line det
|
||||
return -1;
|
||||
|
||||
Canny( src, dst, 50, 200, 3 );
|
||||
cvtColor( dst, color_dst, CV_GRAY2BGR );
|
||||
cvtColor( dst, color_dst, COLOR_GRAY2BGR );
|
||||
|
||||
#if 0
|
||||
vector<Vec2f> lines;
|
||||
|
@@ -42,8 +42,8 @@ arrays. The elements of a tuple used to increment
|
||||
a histogram bin are taken from the corresponding
|
||||
input arrays at the same location. The sample below shows how to compute a 2D Hue-Saturation histogram for a color image. ::
|
||||
|
||||
#include <cv.h>
|
||||
#include <highgui.h>
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
|
||||
using namespace cv;
|
||||
|
||||
@@ -53,7 +53,7 @@ input arrays at the same location. The sample below shows how to compute a 2D Hu
|
||||
if( argc != 2 || !(src=imread(argv[1], 1)).data )
|
||||
return -1;
|
||||
|
||||
cvtColor(src, hsv, CV_BGR2HSV);
|
||||
cvtColor(src, hsv, COLOR_BGR2HSV);
|
||||
|
||||
// Quantize the hue to 30 levels
|
||||
// and the saturation to 32 levels
|
||||
|
@@ -43,7 +43,6 @@
|
||||
#ifndef __OPENCV_IMGPROC_IMGPROC_C_H__
|
||||
#define __OPENCV_IMGPROC_IMGPROC_C_H__
|
||||
|
||||
#include "opencv2/core/core_c.h"
|
||||
#include "opencv2/imgproc/types_c.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@@ -39,14 +39,6 @@
|
||||
//
|
||||
//M*/
|
||||
|
||||
/*
|
||||
A few macros and definitions for backward compatibility
|
||||
with the previous versions of OpenCV. They are obsolete and
|
||||
are likely to be removed in future. To check whether your code
|
||||
uses any of these, define CV_NO_BACKWARD_COMPATIBILITY before
|
||||
including cv.h.
|
||||
*/
|
||||
|
||||
#ifndef __OPENCV_COMPAT_HPP__
|
||||
#define __OPENCV_COMPAT_HPP__
|
||||
|
||||
|
@@ -40,11 +40,6 @@
|
||||
//M*/
|
||||
|
||||
#include "precomp.hpp"
|
||||
//#include "cvtypes.h"
|
||||
//#include <float.h>
|
||||
//#include <limits.h>
|
||||
//#include "cv.h"
|
||||
//#include "highgui.h"
|
||||
#if 0
|
||||
#include <stdio.h>
|
||||
|
||||
|
@@ -41,11 +41,8 @@
|
||||
|
||||
|
||||
#include "precomp.hpp"
|
||||
//#include "cvtypes.h"
|
||||
#include <float.h>
|
||||
#include <limits.h>
|
||||
//#include "cv.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void icvReconstructPoints4DStatus(CvMat** projPoints, CvMat **projMatrs, CvMat** presPoints, CvMat *points4D,int numImages,CvMat **projError=0);
|
||||
|
@@ -42,12 +42,8 @@
|
||||
#include "precomp.hpp"
|
||||
#include "opencv2/calib3d/calib3d_c.h"
|
||||
|
||||
//#include "cvtypes.h"
|
||||
#include <float.h>
|
||||
#include <limits.h>
|
||||
//#include "cv.h"
|
||||
//#include "windows.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* Valery Mosyagin */
|
||||
|
@@ -41,6 +41,7 @@
|
||||
//M*/
|
||||
|
||||
#include "precomp.hpp"
|
||||
#include "opencv2/ml.hpp"
|
||||
#include <queue>
|
||||
|
||||
using cv::InputArray;
|
||||
|
@@ -45,7 +45,6 @@
|
||||
|
||||
#include "opencv2/softcascade.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/ml.hpp"
|
||||
|
||||
#include "opencv2/core/private.hpp"
|
||||
#include "opencv2/core/gpu_private.hpp"
|
||||
|
@@ -63,22 +63,4 @@ bool initModule_softcascade(void)
|
||||
return (sc1->info() != 0) && (sc->info() != 0);
|
||||
}
|
||||
|
||||
namespace internal {
|
||||
void error(const char *error_string, const char *file, const int line, const char *func)
|
||||
{
|
||||
int code = CV_GpuApiCallError;
|
||||
|
||||
if (std::uncaught_exception())
|
||||
{
|
||||
const char* errorStr = cvErrorStr(code);
|
||||
const char* function = func ? func : "unknown function";
|
||||
|
||||
std::cerr << "OpenCV Error: " << errorStr << "(" << error_string << ") in " << function << ", file " << file << ", line " << line;
|
||||
std::cerr.flush();
|
||||
}
|
||||
else
|
||||
cv::error( cv::Exception(code, error_string, func, file, line) );
|
||||
}
|
||||
}
|
||||
|
||||
} }
|
@@ -1,8 +1,5 @@
|
||||
#include "opencv2/ts.hpp"
|
||||
|
||||
#include "opencv2/core/core_c.h"
|
||||
#include "opencv2/core/utility.hpp"
|
||||
|
||||
#include "opencv2/core/private.hpp"
|
||||
|
||||
#ifdef GTEST_LINKED_AS_SHARED_LIBRARY
|
||||
|
@@ -40,6 +40,8 @@
|
||||
//M*/
|
||||
|
||||
#include "precomp.hpp"
|
||||
#include "opencv2/core/core_c.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
@@ -40,6 +40,7 @@
|
||||
//M*/
|
||||
|
||||
#include "precomp.hpp"
|
||||
#include "opencv2/core/core_c.h"
|
||||
|
||||
namespace cvtest
|
||||
{
|
||||
|
@@ -645,7 +645,7 @@ void erode(const Mat& _src, Mat& dst, const Mat& _kernel, Point anchor,
|
||||
}
|
||||
if( anchor == Point(-1,-1) )
|
||||
anchor = Point(kernel.cols/2, kernel.rows/2);
|
||||
if( borderType == IPL_BORDER_CONSTANT )
|
||||
if( borderType == BORDER_CONSTANT )
|
||||
borderValue = getMaxVal(src.depth());
|
||||
copyMakeBorder(_src, src, anchor.y, kernel.rows - anchor.y - 1,
|
||||
anchor.x, kernel.cols - anchor.x - 1,
|
||||
@@ -702,7 +702,7 @@ void dilate(const Mat& _src, Mat& dst, const Mat& _kernel, Point anchor,
|
||||
}
|
||||
if( anchor == Point(-1,-1) )
|
||||
anchor = Point(kernel.cols/2, kernel.rows/2);
|
||||
if( borderType == IPL_BORDER_CONSTANT )
|
||||
if( borderType == BORDER_CONSTANT )
|
||||
borderValue = getMinVal(src.depth());
|
||||
copyMakeBorder(_src, src, anchor.y, kernel.rows - anchor.y - 1,
|
||||
anchor.x, kernel.cols - anchor.x - 1,
|
||||
@@ -778,7 +778,7 @@ void filter2D(const Mat& _src, Mat& dst, int ddepth, const Mat& kernel,
|
||||
CV_Assert( kernel.type() == CV_32F || kernel.type() == CV_64F );
|
||||
if( anchor == Point(-1,-1) )
|
||||
anchor = Point(kernel.cols/2, kernel.rows/2);
|
||||
if( borderType == IPL_BORDER_CONSTANT )
|
||||
if( borderType == BORDER_CONSTANT )
|
||||
borderValue = getMinVal(src.depth());
|
||||
copyMakeBorder(_src, src, anchor.y, kernel.rows - anchor.y - 1,
|
||||
anchor.x, kernel.cols - anchor.x - 1,
|
||||
@@ -830,11 +830,11 @@ static int borderInterpolate( int p, int len, int borderType )
|
||||
{
|
||||
if( (unsigned)p < (unsigned)len )
|
||||
;
|
||||
else if( borderType == IPL_BORDER_REPLICATE )
|
||||
else if( borderType == BORDER_REPLICATE )
|
||||
p = p < 0 ? 0 : len - 1;
|
||||
else if( borderType == IPL_BORDER_REFLECT || borderType == IPL_BORDER_REFLECT_101 )
|
||||
else if( borderType == BORDER_REFLECT || borderType == BORDER_REFLECT_101 )
|
||||
{
|
||||
int delta = borderType == IPL_BORDER_REFLECT_101;
|
||||
int delta = borderType == BORDER_REFLECT_101;
|
||||
if( len == 1 )
|
||||
return 0;
|
||||
do
|
||||
@@ -846,17 +846,17 @@ static int borderInterpolate( int p, int len, int borderType )
|
||||
}
|
||||
while( (unsigned)p >= (unsigned)len );
|
||||
}
|
||||
else if( borderType == IPL_BORDER_WRAP )
|
||||
else if( borderType == BORDER_WRAP )
|
||||
{
|
||||
if( p < 0 )
|
||||
p -= ((p-len+1)/len)*len;
|
||||
if( p >= len )
|
||||
p %= len;
|
||||
}
|
||||
else if( borderType == IPL_BORDER_CONSTANT )
|
||||
else if( borderType == BORDER_CONSTANT )
|
||||
p = -1;
|
||||
else
|
||||
CV_Error( CV_StsBadArg, "Unknown/unsupported border type" );
|
||||
CV_Error( Error::StsBadArg, "Unknown/unsupported border type" );
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -868,7 +868,7 @@ void copyMakeBorder(const Mat& src, Mat& dst, int top, int bottom, int left, int
|
||||
int i, j, k, esz = (int)src.elemSize();
|
||||
int width = src.cols*esz, width1 = dst.cols*esz;
|
||||
|
||||
if( borderType == IPL_BORDER_CONSTANT )
|
||||
if( borderType == BORDER_CONSTANT )
|
||||
{
|
||||
vector<uchar> valvec((src.cols + left + right)*esz);
|
||||
uchar* val = &valvec[0];
|
||||
@@ -1304,7 +1304,7 @@ double norm(const Mat& src, int normType, const Mat& mask)
|
||||
result = norm_((const double*)sptr, total, cn, normType, result, mptr);
|
||||
break;
|
||||
default:
|
||||
CV_Error(CV_StsUnsupportedFormat, "");
|
||||
CV_Error(Error::StsUnsupportedFormat, "");
|
||||
};
|
||||
}
|
||||
if( normType0 == NORM_L2 )
|
||||
@@ -1382,7 +1382,7 @@ double norm(const Mat& src1, const Mat& src2, int normType, const Mat& mask)
|
||||
result = norm_((const double*)sptr1, (const double*)sptr2, total, cn, normType, result, mptr);
|
||||
break;
|
||||
default:
|
||||
CV_Error(CV_StsUnsupportedFormat, "");
|
||||
CV_Error(Error::StsUnsupportedFormat, "");
|
||||
};
|
||||
}
|
||||
if( normType0 == NORM_L2 )
|
||||
@@ -1441,7 +1441,7 @@ double crossCorr(const Mat& src1, const Mat& src2)
|
||||
result += crossCorr_((const double*)sptr1, (const double*)sptr2, total);
|
||||
break;
|
||||
default:
|
||||
CV_Error(CV_StsUnsupportedFormat, "");
|
||||
CV_Error(Error::StsUnsupportedFormat, "");
|
||||
};
|
||||
}
|
||||
return result;
|
||||
@@ -1574,7 +1574,7 @@ compare_(const _Tp* src1, const _Tp* src2, uchar* dst, size_t total, int cmpop)
|
||||
dst[i] = src1[i] > src2[i] ? 255 : 0;
|
||||
break;
|
||||
default:
|
||||
CV_Error(CV_StsBadArg, "Unknown comparison operation");
|
||||
CV_Error(Error::StsBadArg, "Unknown comparison operation");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1610,7 +1610,7 @@ compareS_(const _Tp* src1, _WTp value, uchar* dst, size_t total, int cmpop)
|
||||
dst[i] = src1[i] > value ? 255 : 0;
|
||||
break;
|
||||
default:
|
||||
CV_Error(CV_StsBadArg, "Unknown comparison operation");
|
||||
CV_Error(Error::StsBadArg, "Unknown comparison operation");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1657,7 +1657,7 @@ void compare(const Mat& src1, const Mat& src2, Mat& dst, int cmpop)
|
||||
compare_((const double*)sptr1, (const double*)sptr2, dptr, total, cmpop);
|
||||
break;
|
||||
default:
|
||||
CV_Error(CV_StsUnsupportedFormat, "");
|
||||
CV_Error(Error::StsUnsupportedFormat, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1704,7 +1704,7 @@ void compare(const Mat& src, double value, Mat& dst, int cmpop)
|
||||
compareS_((const double*)sptr, value, dptr, total, cmpop);
|
||||
break;
|
||||
default:
|
||||
CV_Error(CV_StsUnsupportedFormat, "");
|
||||
CV_Error(Error::StsUnsupportedFormat, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1836,7 +1836,7 @@ bool cmpUlps(const Mat& src1, const Mat& src2, int imaxDiff, double* _realmaxdif
|
||||
realmaxdiff = cmpUlpsFlt_((const int64*)sptr1, (const int64*)sptr2, total, imaxDiff, startidx, idx);
|
||||
break;
|
||||
default:
|
||||
CV_Error(CV_StsUnsupportedFormat, "");
|
||||
CV_Error(Error::StsUnsupportedFormat, "");
|
||||
}
|
||||
|
||||
if(_realmaxdiff)
|
||||
@@ -1925,7 +1925,7 @@ int check( const Mat& a, double fmin, double fmax, vector<int>* _idx )
|
||||
checkFlt_((const double*)aptr, total, fmin, fmax, startidx, idx);
|
||||
break;
|
||||
default:
|
||||
CV_Error(CV_StsUnsupportedFormat, "");
|
||||
CV_Error(Error::StsUnsupportedFormat, "");
|
||||
}
|
||||
|
||||
if( idx != 0 )
|
||||
@@ -2344,7 +2344,7 @@ void transform( const Mat& src, Mat& dst, const Mat& transmat, const Mat& _shift
|
||||
transform_((const double*)sptr, (double*)dptr, total, scn, dcn, mat);
|
||||
break;
|
||||
default:
|
||||
CV_Error(CV_StsUnsupportedFormat, "");
|
||||
CV_Error(Error::StsUnsupportedFormat, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2401,7 +2401,7 @@ static void minmax(const Mat& src1, const Mat& src2, Mat& dst, char op)
|
||||
minmax_((const double*)sptr1, (const double*)sptr2, (double*)dptr, total, op);
|
||||
break;
|
||||
default:
|
||||
CV_Error(CV_StsUnsupportedFormat, "");
|
||||
CV_Error(Error::StsUnsupportedFormat, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2469,7 +2469,7 @@ static void minmax(const Mat& src1, double val, Mat& dst, char op)
|
||||
minmax_((const double*)sptr1, saturate_cast<double>(val), (double*)dptr, total, op);
|
||||
break;
|
||||
default:
|
||||
CV_Error(CV_StsUnsupportedFormat, "");
|
||||
CV_Error(Error::StsUnsupportedFormat, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2541,7 +2541,7 @@ static void muldiv(const Mat& src1, const Mat& src2, Mat& dst, double scale, cha
|
||||
muldiv_((const double*)sptr1, (const double*)sptr2, (double*)dptr, total, scale, op);
|
||||
break;
|
||||
default:
|
||||
CV_Error(CV_StsUnsupportedFormat, "");
|
||||
CV_Error(Error::StsUnsupportedFormat, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2626,7 +2626,7 @@ Scalar mean(const Mat& src, const Mat& mask)
|
||||
mean_((const double*)sptr, mptr, total, cn, sum, nz);
|
||||
break;
|
||||
default:
|
||||
CV_Error(CV_StsUnsupportedFormat, "");
|
||||
CV_Error(Error::StsUnsupportedFormat, "");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2863,7 +2863,7 @@ static void writeElems(std::ostream& out, const void* data, int nelems, int dept
|
||||
out.precision(pp);
|
||||
}
|
||||
else
|
||||
CV_Error(CV_StsUnsupportedFormat, "");
|
||||
CV_Error(Error::StsUnsupportedFormat, "");
|
||||
}
|
||||
|
||||
|
||||
|
@@ -56,7 +56,7 @@ FarnebackPolyExp( const Mat& src, Mat& dst, int n, double sigma )
|
||||
{
|
||||
int k, x, y;
|
||||
|
||||
assert( src.type() == CV_32FC1 );
|
||||
CV_Assert( src.type() == CV_32FC1 );
|
||||
int width = src.cols;
|
||||
int height = src.rows;
|
||||
AutoBuffer<float> kbuf(n*6 + 3), _row((width + n*2)*3);
|
||||
|
@@ -44,8 +44,6 @@
|
||||
#define __OPENCV_PRECOMP_H__
|
||||
|
||||
#include "opencv2/video.hpp"
|
||||
#include "opencv2/video/tracking_c.h"
|
||||
|
||||
#include "opencv2/core/utility.hpp"
|
||||
#include "opencv2/core/private.hpp"
|
||||
|
||||
|
Reference in New Issue
Block a user