{
isFound = boxFinder.findHoles();
}
- catch (cv::Exception)
+ catch (const cv::Exception &)
{
}
criteria = cvTermCriteria(0,0,0);
iters = 0;
completeSymmFlag = false;
+ errNorm = prevErrNorm = DBL_MAX;
}
CvLevMarq::CvLevMarq( int nparams, int nerrs, CvTermCriteria criteria0, bool _completeSymmFlag )
J.reset(cvCreateMat( nerrs, nparams, CV_64F ));
err.reset(cvCreateMat( nerrs, 1, CV_64F ));
}
- prevErrNorm = DBL_MAX;
+ errNorm = prevErrNorm = DBL_MAX;
lambdaLg10 = -3;
criteria = criteria0;
if( criteria.type & CV_TERMCRIT_ITER )
int number_of_correspondences;
double cws[4][3], ccs[4][3];
- double cws_determinant;
int max_nr;
double * A1, * A2;
};
Ptr<PointSetRegistrator::Callback> cb;
int modelPoints;
- int maxBasicSolutions;
bool checkPartialSubsets;
double threshold;
double confidence;
{
ts->printf( cvtest::TS::LOG, "The file %s can not be opened or has invalid content\n", filepath.c_str() );
ts->set_failed_test_info( f ? cvtest::TS::FAIL_INVALID_TEST_DATA : cvtest::TS::FAIL_MISSING_TEST_DATA );
+ fclose(f);
return;
}
class CV_CalibrateCameraArtificialTest : public cvtest::BaseTest
{
public:
- CV_CalibrateCameraArtificialTest()
+ CV_CalibrateCameraArtificialTest() :
+ r(0)
{
}
~CV_CalibrateCameraArtificialTest() {}
progress = update_progress( progress, idx, max_idx, 0 );
}
- sum_error /= count;
+ if (count != 0)
+ sum_error /= count;
ts->printf(cvtest::TS::LOG, "Average error is %f\n", sum_error);
}
}
};
-CV_ChessboardDetectorBadArgTest::CV_ChessboardDetectorBadArgTest() {}
+CV_ChessboardDetectorBadArgTest::CV_ChessboardDetectorBadArgTest()
+{
+ cpp = false;
+ flags = 0;
+ out_corners = NULL;
+ out_corner_count = NULL;
+ drawCorners = was_found = false;
+}
/* ///////////////////// chess_corner_test ///////////////////////// */
void CV_ChessboardDetectorBadArgTest::run( int /*start_from */)
progress = update_progress( progress, i-1, runs_count, 0 );
}
+ ASSERT_NE(0, count);
sum_dist /= count;
ts->printf(cvtest::TS::LOG, "Average error after findCornerSubpix: %f\n", sum_dist);
method = 0;
img_size = 10;
cube_size = 10;
+ dims = 0;
min_f = 1;
max_f = 3;
sigma = 0;//0.1;
int img_size;
int cube_size;
int dims;
- int e_result;
double min_f, max_f;
double sigma;
};
method = 0;
img_size = 10;
cube_size = 10;
+ dims = 0;
min_f = 1;
max_f = 3;
-
+ sigma = 0;
}
test_array[INPUT].push_back(NULL);
test_array[OUTPUT].push_back(NULL);
test_array[REF_OUTPUT].push_back(NULL);
+
+ matrix_type = 0;
+ center_principal_point = false;
}
void CV_DefaultNewCameraMatrixTest::get_test_array_types_and_sizes( int test_case_idx, vector<vector<Size> >& sizes, vector<vector<int> >& types )
test_array[OUTPUT].push_back(NULL); // distorted dst points
test_array[TEMP].push_back(NULL); // dst points
test_array[REF_OUTPUT].push_back(NULL);
+
+ useCPlus = useDstMat = false;
+ zero_new_cam = zero_distortion = zero_R = false;
}
void CV_UndistortPointsTest::get_test_array_types_and_sizes( int test_case_idx, vector<vector<Size> >& sizes, vector<vector<int> >& types )
test_array[INPUT].push_back(NULL); // new camera matrix
test_array[OUTPUT].push_back(NULL); // distorted dst points
test_array[REF_OUTPUT].push_back(NULL);
+
+ useCPlus = false;
+ zero_distortion = zero_new_cam = zero_R = false;
+ _mapx = _mapy = NULL;
+ mat_type = 0;
}
void CV_InitUndistortRectifyMapTest::get_test_array_types_and_sizes( int test_case_idx, vector<vector<Size> >& sizes, vector<vector<int> >& types )
CV_UndistortPointsBadArgTest::CV_UndistortPointsBadArgTest ()
{
+ useCPlus = false;
+ _camera_mat = matR = matP = _distortion_coeffs = _src_points = _dst_points = NULL;
}
void CV_UndistortPointsBadArgTest::run_func()
CV_InitUndistortRectifyMapBadArgTest::CV_InitUndistortRectifyMapBadArgTest ()
{
+ useCPlus = false;
+ _camera_mat = matR = _new_camera_mat = _distortion_coeffs = _mapx = _mapy = NULL;
}
void CV_InitUndistortRectifyMapBadArgTest::run_func()
CV_UndistortBadArgTest::CV_UndistortBadArgTest ()
{
+ useCPlus = false;
+ _camera_mat = _new_camera_mat = _distortion_coeffs = _src = _dst = NULL;
}
void CV_UndistortBadArgTest::run_func()
public:
struct Node
{
- Node() {}
+ Node() { memset(this, 0, sizeof(Node)); }
int begin, end;
float x_min, x_max, y_min, y_max, z_min, z_max;
int maxLevels;
CommandLineParser(const CommandLineParser& parser);
CommandLineParser& operator = (const CommandLineParser& parser);
+ ~CommandLineParser();
+
String getPathToApplication() const;
template <typename T>
impl->sort_params();
}
+CommandLineParser::~CommandLineParser()
+{
+ if (CV_XADD(&impl->refcount, -1) == 1)
+ delete impl;
+}
CommandLineParser::CommandLineParser(const CommandLineParser& parser)
{
struct Kernel::Impl
{
- Impl(const char* kname, const Program& prog)
+ Impl(const char* kname, const Program& prog) :
+ refcount(1), e(0), nu(0)
{
- e = 0; refcount = 1;
cl_program ph = (cl_program)prog.ptr();
cl_int retval = 0;
handle = ph != 0 ?
BaseElemWiseOp(int _ninputs, int _flags, double _alpha, double _beta,
Scalar _gamma=Scalar::all(0), int _context=1)
: ninputs(_ninputs), flags(_flags), alpha(_alpha), beta(_beta), gamma(_gamma), context(_context) {}
- BaseElemWiseOp() { flags = 0; alpha = beta = 0; gamma = Scalar::all(0); }
+ BaseElemWiseOp() { flags = 0; alpha = beta = 0; gamma = Scalar::all(0); ninputs = 0; context = 1; }
virtual ~BaseElemWiseOp() {}
virtual void op(const vector<Mat>&, Mat&, const Mat&) {}
virtual void refop(const vector<Mat>&, Mat&, const Mat&) {}
double alpha;
double beta;
Scalar gamma;
- int maxErr;
int context;
};
struct CmpOp : public BaseElemWiseOp
{
- CmpOp() : BaseElemWiseOp(2, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {}
+ CmpOp() : BaseElemWiseOp(2, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) { cmpop = 0; }
void generateScalars(int depth, RNG& rng)
{
BaseElemWiseOp::generateScalars(depth, rng);
struct CmpSOp : public BaseElemWiseOp
{
- CmpSOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+REAL_GAMMA, 1, 1, Scalar::all(0)) {}
+ CmpSOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+REAL_GAMMA, 1, 1, Scalar::all(0)) { cmpop = 0; }
void generateScalars(int depth, RNG& rng)
{
BaseElemWiseOp::generateScalars(depth, rng);
struct CopyOp : public BaseElemWiseOp
{
- CopyOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+FIX_GAMMA+SUPPORT_MASK, 1, 1, Scalar::all(0)) {}
+ CopyOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+FIX_GAMMA+SUPPORT_MASK, 1, 1, Scalar::all(0)) { }
void op(const vector<Mat>& src, Mat& dst, const Mat& mask)
{
src[0].copyTo(dst, mask);
{
return 0;
}
- int cmpop;
};
struct FlipOp : public BaseElemWiseOp
{
- FlipOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {}
+ FlipOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) { flipcode = 0; }
void getRandomSize(RNG& rng, vector<int>& size)
{
cvtest::randomSize(rng, 2, 2, cvtest::ARITHM_MAX_SIZE_LOG, size);
{
test_case_count = 100;
max_log_array_size = 10;
+ tabc_flag = 0;
alpha = beta = 0;
}
Core_TransformTest::Core_TransformTest() : Core_MatrixTest( 3, 1, true, false, 4 )
{
+ scale = 1;
+ diagMtx = false;
}
Core_CovarMatrixTest::Core_CovarMatrixTest() : Core_MatrixTest( 1, 1, true, false, 1 ),
-flags(0), t_flag(0), are_images(false)
+ flags(0), t_flag(0), len(0), count(0), are_images(false)
{
test_case_count = 100;
test_array[INPUT_OUTPUT].push_back(NULL);
namespace cv
{
-BOWTrainer::BOWTrainer()
+BOWTrainer::BOWTrainer() : size(0)
{}
BOWTrainer::~BOWTrainer()
std::vector<int> indexChange)
{
generateKernel(radiusList, numberList, dMax, dMin, indexChange);
+ threshold = 20;
+ octaves = 3;
}
void
int wtype = CV_MAKETYPE(wdepth, src.channels());
Mat kd, ks;
getSobelKernels( kd, ks, 2, 0, ksize, false, ktype );
- if( ddepth < 0 )
- ddepth = src.depth();
int dtype = CV_MAKETYPE(ddepth, src.channels());
int dy0 = std::min(std::max((int)(STRIPE_SIZE/(getElemSize(src.type())*src.cols)), 1), src.rows);
struct RowVec_32f
{
- RowVec_32f() {}
+ RowVec_32f()
+ {
+ haveSSE = checkHardwareSupport(CV_CPU_SSE);
+ }
+
RowVec_32f( const Mat& _kernel )
{
kernel = _kernel;
test_cpp = false;
hue_range = 0;
+ blue_idx = 0;
+ inplace = false;
}
{
struct DTreeBestSplitFinder
{
- DTreeBestSplitFinder(){ tree = 0; node = 0; }
+ DTreeBestSplitFinder(){ splitSize = 0, tree = 0; node = 0; }
DTreeBestSplitFinder( CvDTree* _tree, CvDTreeNode* _node);
DTreeBestSplitFinder( const DTreeBestSplitFinder& finder, Split );
virtual ~DTreeBestSplitFinder() {}
}
MatComparator::MatComparator(double _maxdiff, int _context)
- : maxdiff(_maxdiff), context(_context) {}
+ : maxdiff(_maxdiff), realmaxdiff(DBL_MAX), context(_context) {}
::testing::AssertionResult
MatComparator::operator()(const char* expr1, const char* expr2,
#endif
TestBase::TestBase(): testStrategy(PERF_STRATEGY_DEFAULT), declare(this)
{
+ lastTime = totalTime = timeLimit = 0;
+ nIters = currentIter = runsPerIteration = 0;
+ verified = false;
}
#ifdef _MSC_VER
# pragma warning(pop)
if (r == height && c == 0) { return v21;}
if (r == height && c == width) { return v22;}
+ CV_Assert(height > 0 && width > 0);
float qr = float(r) / height;
float pr = 1.0f - qr;
float qc = float(c) / width;