Skip to content

Commit 73bfe68

Browse files
committed
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2 parents 4a73b48 + f3fae0d commit 73bfe68

File tree

141 files changed

+3024
-4727
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+3024
-4727
lines changed

apps/traincascade/boost.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ void CvCascadeBoostTrainData::setData( const CvFeatureEvaluator* _featureEvaluat
543543
featureEvaluator = _featureEvaluator;
544544

545545
max_c_count = MAX( 2, featureEvaluator->getMaxCatCount() );
546-
_resp = featureEvaluator->getCls();
546+
_resp = cvMat(featureEvaluator->getCls());
547547
responses = &_resp;
548548
// TODO: check responses: elements must be 0 or 1
549549

apps/traincascade/old_ml_boost.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,12 +2122,12 @@ CvBoost::train( const Mat& _train_data, int _tflag,
21222122
const Mat& _missing_mask,
21232123
CvBoostParams _params, bool _update )
21242124
{
2125-
train_data_hdr = _train_data;
2125+
train_data_hdr = cvMat(_train_data);
21262126
train_data_mat = _train_data;
2127-
responses_hdr = _responses;
2127+
responses_hdr = cvMat(_responses);
21282128
responses_mat = _responses;
21292129

2130-
CvMat vidx = _var_idx, sidx = _sample_idx, vtype = _var_type, mmask = _missing_mask;
2130+
CvMat vidx = cvMat(_var_idx), sidx = cvMat(_sample_idx), vtype = cvMat(_var_type), mmask = cvMat(_missing_mask);
21312131

21322132
return train(&train_data_hdr, _tflag, &responses_hdr, vidx.data.ptr ? &vidx : 0,
21332133
sidx.data.ptr ? &sidx : 0, vtype.data.ptr ? &vtype : 0,
@@ -2138,7 +2138,7 @@ float
21382138
CvBoost::predict( const Mat& _sample, const Mat& _missing,
21392139
const Range& slice, bool raw_mode, bool return_sum ) const
21402140
{
2141-
CvMat sample = _sample, mmask = _missing;
2141+
CvMat sample = cvMat(_sample), mmask = cvMat(_missing);
21422142
/*if( weak_responses )
21432143
{
21442144
int weak_count = cvSliceLength( slice, weak );

apps/traincascade/old_ml_tree.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,12 +1592,12 @@ bool CvDTree::train( const Mat& _train_data, int _tflag,
15921592
const Mat& _sample_idx, const Mat& _var_type,
15931593
const Mat& _missing_mask, CvDTreeParams _params )
15941594
{
1595-
train_data_hdr = _train_data;
1595+
train_data_hdr = cvMat(_train_data);
15961596
train_data_mat = _train_data;
1597-
responses_hdr = _responses;
1597+
responses_hdr = cvMat(_responses);
15981598
responses_mat = _responses;
15991599

1600-
CvMat vidx=_var_idx, sidx=_sample_idx, vtype=_var_type, mmask=_missing_mask;
1600+
CvMat vidx=cvMat(_var_idx), sidx=cvMat(_sample_idx), vtype=cvMat(_var_type), mmask=cvMat(_missing_mask);
16011601

16021602
return train(&train_data_hdr, _tflag, &responses_hdr, vidx.data.ptr ? &vidx : 0, sidx.data.ptr ? &sidx : 0,
16031603
vtype.data.ptr ? &vtype : 0, mmask.data.ptr ? &mmask : 0, _params);
@@ -3734,7 +3734,7 @@ CvDTreeNode* CvDTree::predict( const CvMat* _sample,
37343734

37353735
CvDTreeNode* CvDTree::predict( const Mat& _sample, const Mat& _missing, bool preprocessed_input ) const
37363736
{
3737-
CvMat sample = _sample, mmask = _missing;
3737+
CvMat sample = cvMat(_sample), mmask = cvMat(_missing);
37383738
return predict(&sample, mmask.data.ptr ? &mmask : 0, preprocessed_input);
37393739
}
37403740

cmake/OpenCVCompilerOptions.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ if(CV_GCC OR CV_CLANG)
125125
)
126126
add_extra_compiler_option(-Wimplicit-fallthrough=3)
127127
endif()
128-
if(CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 7.2.0)
129-
add_extra_compiler_option(-Wno-strict-overflow) # Issue is fixed in GCC 7.2.1
128+
if(CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
129+
add_extra_compiler_option(-Wno-strict-overflow) # Issue appears when compiling surf.cpp from opencv_contrib/modules/xfeatures2d
130130
endif()
131131
endif()
132132
add_extra_compiler_option(-fdiagnostics-show-option)

modules/calib3d/perf/perf_pnp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ PERF_TEST_P(PointsNum_Algo, solvePnP,
5252
cv::solvePnP(points3d, points2d, intrinsics, distortion, rvec, tvec, false, algo);
5353
}
5454

55-
SANITY_CHECK(rvec, 1e-6);
56-
SANITY_CHECK(tvec, 1e-6);
55+
SANITY_CHECK(rvec, 1e-4);
56+
SANITY_CHECK(tvec, 1e-4);
5757
}
5858

5959
PERF_TEST_P(PointsNum_Algo, solvePnPSmallPoints,

0 commit comments

Comments
 (0)