Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
35972a1e
Commit
35972a1e
authored
Nov 17, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
parents
64961f37
d1fc1c64
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
44 additions
and
65 deletions
+44
-65
test_descriptors_regression.cpp
modules/line_descriptor/test/test_descriptors_regression.cpp
+5
-31
sparse_matching_gpc.hpp
...s/optflow/include/opencv2/optflow/sparse_matching_gpc.hpp
+0
-7
CMakeLists.txt
modules/sfm/src/libmv_light/CMakeLists.txt
+4
-0
ppf_match_3d.cpp
modules/surface_matching/src/ppf_match_3d.cpp
+3
-3
test_gms_matcher.cpp
modules/xfeatures2d/test/test_gms_matcher.cpp
+4
-4
test_rotation_and_scale_invariance.cpp
...s/xfeatures2d/test/test_rotation_and_scale_invariance.cpp
+2
-2
structured_edge_detection.cpp
modules/ximgproc/src/structured_edge_detection.cpp
+16
-6
test_edgeboxes.cpp
modules/ximgproc/test/test_edgeboxes.cpp
+1
-1
test_fourier_descriptors.cpp
modules/ximgproc/test/test_fourier_descriptors.cpp
+1
-1
test_matchcolortemplate.cpp
modules/ximgproc/test/test_matchcolortemplate.cpp
+2
-2
test_ridge_detection_filter.cpp
modules/ximgproc/test/test_ridge_detection_filter.cpp
+2
-4
test_structured_edge_detection.cpp
modules/ximgproc/test/test_structured_edge_detection.cpp
+1
-1
test_thinning.cpp
modules/ximgproc/test/test_thinning.cpp
+2
-2
training.markdown
modules/ximgproc/tutorials/training.markdown
+1
-1
No files found.
modules/line_descriptor/test/test_descriptors_regression.cpp
View file @
35972a1e
...
...
@@ -100,19 +100,7 @@ class CV_BD_DescriptorsTest : public cvtest::BaseTest
curMaxDist
=
dist
;
}
std
::
stringstream
ss
;
ss
<<
"Max distance between valid and computed descriptors "
<<
curMaxDist
;
if
(
curMaxDist
<
maxDist
)
ss
<<
"."
<<
std
::
endl
;
else
{
ss
<<
">"
<<
maxDist
<<
" - bad accuracy!"
<<
"
\n
"
;
ts
->
set_failed_test_info
(
cvtest
::
TS
::
FAIL_BAD_ACCURACY
);
}
ts
->
printf
(
cvtest
::
TS
::
LOG
,
ss
.
str
().
c_str
()
);
EXPECT_LT
(
curMaxDist
,
maxDist
)
<<
"Max distance between valid and computed descriptors"
;
}
Mat
readDescriptors
()
...
...
@@ -286,25 +274,11 @@ class CV_BD_DescriptorsTest : public cvtest::BaseTest
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"
\n
Average time of computing one descriptor = %g ms.
\n
"
,
t
/
(
(
double
)
getTickFrequency
()
*
1000.
)
/
calcDescriptors
.
rows
);
if
(
calcDescriptors
.
rows
!=
(
int
)
keylines
.
size
()
)
{
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"Count of computed descriptors and keylines count must be equal.
\n
"
);
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"Count of keylines is %d.
\n
"
,
(
int
)
keylines
.
size
()
);
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"Count of computed descriptors is %d.
\n
"
,
calcDescriptors
.
rows
);
ts
->
set_failed_test_info
(
cvtest
::
TS
::
FAIL_INVALID_OUTPUT
);
return
;
}
ASSERT_EQ
((
int
)
keylines
.
size
(),
calcDescriptors
.
rows
)
<<
"Count of computed descriptors and keylines count must be equal"
;
if
(
calcDescriptors
.
cols
!=
bd
->
descriptorSize
()
/
8
||
calcDescriptors
.
type
()
!=
bd
->
descriptorType
()
)
{
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"Incorrect descriptor size or descriptor type.
\n
"
);
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"Expected size is %d.
\n
"
,
bd
->
descriptorSize
()
);
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"Calculated size is %d.
\n
"
,
calcDescriptors
.
cols
);
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"Expected type is %d.
\n
"
,
bd
->
descriptorType
()
);
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"Calculated type is %d.
\n
"
,
calcDescriptors
.
type
()
);
ts
->
set_failed_test_info
(
cvtest
::
TS
::
FAIL_INVALID_OUTPUT
);
return
;
}
ASSERT_EQ
(
bd
->
descriptorSize
()
/
8
,
calcDescriptors
.
cols
);
ASSERT_EQ
(
bd
->
descriptorType
(),
calcDescriptors
.
type
());
// TODO read and write descriptor extractor parameters and check them
Mat
validDescriptors
=
readDescriptors
();
...
...
modules/optflow/include/opencv2/optflow/sparse_matching_gpc.hpp
View file @
35972a1e
...
...
@@ -135,13 +135,6 @@ struct GPCTrainingParams
CV_Assert
(
check
()
);
}
GPCTrainingParams
(
const
GPCTrainingParams
&
params
)
:
maxTreeDepth
(
params
.
maxTreeDepth
),
minNumberOfSamples
(
params
.
minNumberOfSamples
),
descriptorType
(
params
.
descriptorType
),
printProgress
(
params
.
printProgress
)
{
CV_Assert
(
check
()
);
}
bool
check
()
const
{
return
maxTreeDepth
>
1
&&
minNumberOfSamples
>
1
;
}
};
...
...
modules/sfm/src/libmv_light/CMakeLists.txt
View file @
35972a1e
...
...
@@ -7,5 +7,8 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS -Winconsistent-missing-override -Wsuggest-o
if
(
CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wclass-memaccess
)
endif
()
if
(
CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.0
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wdeprecated-copy
)
endif
()
add_subdirectory
(
libmv
)
\ No newline at end of file
modules/surface_matching/src/ppf_match_3d.cpp
View file @
35972a1e
...
...
@@ -82,10 +82,10 @@ static KeyType hashPPF(const Vec4d& f, const double AngleStep, const double Dist
(
int
)(
f
[
1
]
/
AngleStep
),
(
int
)(
f
[
2
]
/
AngleStep
),
(
int
)(
f
[
3
]
/
DistanceStep
));
KeyType
hashKey
=
0
;
KeyType
hashKey
[
2
]
=
{
0
,
0
};
// hashMurmurx64() fills two values
murmurHash
(
key
.
val
,
4
*
sizeof
(
int
),
42
,
&
hashKey
);
return
hashKey
;
murmurHash
(
key
.
val
,
4
*
sizeof
(
int
),
42
,
&
hashKey
[
0
]
);
return
hashKey
[
0
]
;
}
/*static size_t hashMurmur(uint key)
...
...
modules/xfeatures2d/test/test_gms_matcher.cpp
View file @
35972a1e
...
...
@@ -37,10 +37,10 @@ CV_GMSMatcherTest::CV_GMSMatcherTest()
eps
[
1
][
2
]
=
0.80
;
eps
[
1
][
3
]
=
0.78
;
eps
[
2
][
0
]
=
0.
70
;
eps
[
2
][
1
]
=
0.6
6
;
eps
[
2
][
2
]
=
0.6
8
;
eps
[
2
][
3
]
=
0.6
3
;
eps
[
2
][
0
]
=
0.
6
;
eps
[
2
][
1
]
=
0.6
;
eps
[
2
][
2
]
=
0.6
;
eps
[
2
][
3
]
=
0.6
;
correctMatchDistThreshold
=
5.0
;
}
...
...
modules/xfeatures2d/test/test_rotation_and_scale_invariance.cpp
View file @
35972a1e
...
...
@@ -33,7 +33,7 @@ INSTANTIATE_TEST_CASE_P(SIFT, DescriptorRotationInvariance, Values(
));
INSTANTIATE_TEST_CASE_P
(
LATCH
,
DescriptorRotationInvariance
,
Values
(
make_tuple
(
IMAGE_TSUKUBA
,
SIFT
::
create
(),
LATCH
::
create
(),
0.9
999
f
)
make_tuple
(
IMAGE_TSUKUBA
,
SIFT
::
create
(),
LATCH
::
create
(),
0.9
8
f
)
));
#endif // NONFREE
...
...
@@ -154,7 +154,6 @@ INSTANTIATE_TEST_CASE_P(BoostDesc_BINBOOST_256, DescriptorRotationInvariance, Va
// ============================ SCALE INVARIANCE ==============================
#ifdef OPENCV_ENABLE_NONFREE
INSTANTIATE_TEST_CASE_P
(
SURF
,
DetectorScaleInvariance
,
Values
(
make_tuple
(
IMAGE_BIKES
,
SURF
::
create
(),
0.64
f
,
0.84
f
)
...
...
@@ -284,6 +283,7 @@ TEST(Features2d_RotationInvariance2_Detector_SURF, regression)
ASSERT_LT
(
fabs
(
keypoints
[
i1
].
response
-
keypoints
[
i
].
response
)
/
keypoints
[
i1
].
response
,
1e-6
);
}
}
#endif // NONFREE
}}
// namespace
modules/ximgproc/src/structured_edge_detection.cpp
View file @
35972a1e
...
...
@@ -37,16 +37,24 @@
//
//M*/
#include "precomp.hpp"
#include <vector>
#include <algorithm>
#include <iterator>
#include <iostream>
#include <cmath>
#include "precomp.hpp"
#include "advanced_types.hpp"
#ifdef CV_CXX11
#define CV_USE_PARALLEL_PREDICT_EDGES_1 1
#define CV_USE_PARALLEL_PREDICT_EDGES_2 0 //1, see https://github.com/opencv/opencv_contrib/issues/2346
#else
#define CV_USE_PARALLEL_PREDICT_EDGES_1 0
#define CV_USE_PARALLEL_PREDICT_EDGES_2 0
#endif
/********************* Helper functions *********************/
/*!
...
...
@@ -730,7 +738,7 @@ protected:
}
// lookup tables for mapping linear index to offset pairs
#if
def CV_CXX1
1
#if
CV_USE_PARALLEL_PREDICT_EDGES_
1
parallel_for_
(
cv
::
Range
(
0
,
height
),
[
&
](
const
cv
::
Range
&
range
)
#else
const
cv
::
Range
range
(
0
,
height
);
...
...
@@ -779,7 +787,7 @@ protected:
}
}
}
#if
def CV_CXX1
1
#if
CV_USE_PARALLEL_PREDICT_EDGES_
1
);
#endif
...
...
@@ -788,8 +796,10 @@ protected:
dstM
.
setTo
(
0
);
float
step
=
2.0
f
*
CV_SQR
(
stride
)
/
CV_SQR
(
ipSize
)
/
nTreesEval
;
#if
def CV_CXX11
#if
CV_USE_PARALLEL_PREDICT_EDGES_2
parallel_for_
(
cv
::
Range
(
0
,
height
),
[
&
](
const
cv
::
Range
&
range
)
#elif CV_USE_PARALLEL_PREDICT_EDGES_1
const
cv
::
Range
range
(
0
,
height
);
#endif
{
for
(
int
i
=
range
.
start
;
i
<
range
.
end
;
++
i
)
...
...
@@ -816,7 +826,7 @@ protected:
}
}
}
#if
def CV_CXX11
#if
CV_USE_PARALLEL_PREDICT_EDGES_2
);
#endif
...
...
modules/ximgproc/test/test_edgeboxes.cpp
View file @
35972a1e
...
...
@@ -5,7 +5,7 @@
namespace
opencv_test
{
namespace
{
TEST
(
xim
pgroc_Edgeboxes
,
DISABLED_
regression
)
TEST
(
xim
gproc_Edgeboxes
,
regression
)
{
//Testing Edgeboxes implementation by asking for one proposal
//on a simple test image from the PASCAL VOC 2012 dataset.
...
...
modules/ximgproc/test/test_fourier_descriptors.cpp
View file @
35972a1e
...
...
@@ -7,7 +7,7 @@
namespace
opencv_test
{
namespace
{
TEST
(
xim
pg
roc_fourierdescriptors
,
test_FD_AND_FIT
)
TEST
(
xim
gp
roc_fourierdescriptors
,
test_FD_AND_FIT
)
{
Mat
fd
;
vector
<
Point2f
>
ctr
(
16
);
...
...
modules/ximgproc/test/test_matchcolortemplate.cpp
View file @
35972a1e
...
...
@@ -7,7 +7,7 @@
namespace
opencv_test
{
namespace
{
TEST
(
xim
pg
roc_matchcolortemplate
,
test_QFFT
)
TEST
(
xim
gp
roc_matchcolortemplate
,
test_QFFT
)
{
String
openCVExtraDir
=
cvtest
::
TS
::
ptr
()
->
get_data_path
();
String
dataPath
=
openCVExtraDir
;
...
...
@@ -58,7 +58,7 @@ TEST(ximpgroc_matchcolortemplate,test_QFFT)
}
}
TEST
(
xim
pg
roc_matchcolortemplate
,
test_COLORMATCHTEMPLATE
)
TEST
(
xim
gp
roc_matchcolortemplate
,
test_COLORMATCHTEMPLATE
)
{
String
openCVExtraDir
=
cvtest
::
TS
::
ptr
()
->
get_data_path
();
String
dataPath
=
openCVExtraDir
+
"cv/ximgproc/corr.yml.gz"
;
...
...
modules/ximgproc/test/test_ridge_detection_filter.cpp
View file @
35972a1e
...
...
@@ -20,10 +20,8 @@ TEST(ximgproc_ridgedetectionfilter, ReferenceAccuracy)
rdf
->
getRidgeFilteredImage
(
src
,
out
);
Mat
out_cmp
;
out
.
convertTo
(
out_cmp
,
CV_8UC1
);
Mat
sb
;
subtract
(
out_cmp
,
n_ref
,
sb
);
int
zeros
=
countNonZero
(
sb
);
EXPECT_EQ
(
zeros
,
0
);
EXPECT_LE
(
cvtest
::
norm
(
out
,
ref
,
NORM_INF
),
0.0
f
);
EXPECT_LE
(
cvtest
::
norm
(
out
,
ref
,
NORM_L2
|
NORM_RELATIVE
),
.0
f
);
}
}}
// namespace
modules/ximgproc/test/test_structured_edge_detection.cpp
View file @
35972a1e
...
...
@@ -5,7 +5,7 @@
namespace
opencv_test
{
namespace
{
TEST
(
xim
pg
roc_StructuredEdgeDetection
,
regression
)
TEST
(
xim
gp
roc_StructuredEdgeDetection
,
regression
)
{
cv
::
String
subfolder
=
"cv/ximgproc/"
;
cv
::
String
dir
=
cvtest
::
TS
::
ptr
()
->
get_data_path
()
+
subfolder
;
...
...
modules/ximgproc/test/test_thinning.cpp
View file @
35972a1e
...
...
@@ -18,7 +18,7 @@ static int createTestImage(Mat& src)
return
src_pixels
;
}
TEST
(
xim
pg
roc_Thinning
,
simple_ZHANGSUEN
)
TEST
(
xim
gp
roc_Thinning
,
simple_ZHANGSUEN
)
{
Mat
src
;
int
src_pixels
=
createTestImage
(
src
);
...
...
@@ -33,7 +33,7 @@ TEST(ximpgroc_Thinning, simple_ZHANGSUEN)
#endif
}
TEST
(
xim
pg
roc_Thinning
,
simple_GUOHALL
)
TEST
(
xim
gp
roc_Thinning
,
simple_GUOHALL
)
{
Mat
src
;
int
src_pixels
=
createTestImage
(
src
);
...
...
modules/ximgproc/tutorials/training.markdown
View file @
35972a1e
...
...
@@ -103,7 +103,7 @@ Training pipeline
-# The final step is converting trained model from Matlab binary format to YAML which you can use
with our ocv::StructuredEdgeDetection. For this purpose run
opencv_contrib/xim
pg
roc/tutorials/scripts/modelConvert(model, "model.yml")
opencv_contrib/xim
gp
roc/tutorials/scripts/modelConvert(model, "model.yml")
How to use your model
---------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment