Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
01d3848f
Commit
01d3848f
authored
Oct 16, 2014
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all the tests now pass except for MSER
parent
162384a8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
47 additions
and
21 deletions
+47
-21
core.hpp
modules/core/include/opencv2/core.hpp
+3
-0
algorithm.cpp
modules/core/src/algorithm.cpp
+3
-0
features2d.hpp
modules/features2d/include/opencv2/features2d.hpp
+3
-2
perf_fast.cpp
modules/features2d/perf/opencl/perf_fast.cpp
+1
-4
perf_fast.cpp
modules/features2d/perf/perf_fast.cpp
+1
-4
brisk.cpp
modules/features2d/src/brisk.cpp
+1
-1
fast.cpp
modules/features2d/src/fast.cpp
+24
-0
mser.cpp
modules/features2d/src/mser.cpp
+3
-0
test_descriptors_regression.cpp
modules/features2d/test/test_descriptors_regression.cpp
+1
-3
test_keypoints.cpp
modules/features2d/test/test_keypoints.cpp
+0
-0
test_matchers_algorithmic.cpp
modules/features2d/test/test_matchers_algorithmic.cpp
+2
-2
test_rotation_and_scale_invariance.cpp
...es/features2d/test/test_rotation_and_scale_invariance.cpp
+2
-2
matchers.cpp
modules/stitching/src/matchers.cpp
+3
-3
No files found.
modules/core/include/opencv2/core.hpp
View file @
01d3848f
...
...
@@ -874,6 +874,9 @@ public:
virtual
~
Algorithm
();
String
name
()
const
;
virtual
void
set
(
int
,
double
);
virtual
double
get
(
int
)
const
;
template
<
typename
_Tp
>
typename
ParamType
<
_Tp
>::
member_type
get
(
const
String
&
name
)
const
;
template
<
typename
_Tp
>
typename
ParamType
<
_Tp
>::
member_type
get
(
const
char
*
name
)
const
;
...
...
modules/core/src/algorithm.cpp
View file @
01d3848f
...
...
@@ -179,6 +179,9 @@ String Algorithm::name() const
return
info
()
->
name
();
}
void
Algorithm
::
set
(
int
,
double
)
{}
double
Algorithm
::
get
(
int
)
const
{
return
0.
;
}
void
Algorithm
::
set
(
const
String
&
parameter
,
int
value
)
{
info
()
->
set
(
this
,
parameter
.
c_str
(),
ParamType
<
int
>::
type
,
&
value
);
...
...
modules/features2d/include/opencv2/features2d.hpp
View file @
01d3848f
...
...
@@ -213,9 +213,10 @@ CV_EXPORTS void FAST( InputArray image, CV_OUT std::vector<KeyPoint>& keypoints,
class
CV_EXPORTS_W
FastFeatureDetector
:
public
Feature2D
{
public
:
enum
Type
enum
{
TYPE_5_8
=
0
,
TYPE_7_12
=
1
,
TYPE_9_16
=
2
TYPE_5_8
=
0
,
TYPE_7_12
=
1
,
TYPE_9_16
=
2
,
THRESHOLD
=
10000
,
NONMAX_SUPPRESSION
=
10001
,
FAST_N
=
10002
,
};
CV_WRAP
static
Ptr
<
FastFeatureDetector
>
create
(
int
threshold
=
10
,
...
...
modules/features2d/perf/opencl/perf_fast.cpp
View file @
01d3848f
...
...
@@ -32,11 +32,8 @@ OCL_PERF_TEST_P(FASTFixture, FastDetect, testing::Combine(
mframe
.
copyTo
(
frame
);
declare
.
in
(
frame
);
Ptr
<
FeatureDetector
>
fd
=
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.FAST"
);
Ptr
<
FeatureDetector
>
fd
=
FastFeatureDetector
::
create
(
20
,
true
,
type
);
ASSERT_FALSE
(
fd
.
empty
()
);
fd
->
set
(
"threshold"
,
20
);
fd
->
set
(
"nonmaxSuppression"
,
true
);
fd
->
set
(
"type"
,
type
);
vector
<
KeyPoint
>
points
;
OCL_TEST_CYCLE
()
fd
->
detect
(
frame
,
points
);
...
...
modules/features2d/perf/perf_fast.cpp
View file @
01d3848f
...
...
@@ -30,11 +30,8 @@ PERF_TEST_P(fast, detect, testing::Combine(
declare
.
in
(
frame
);
Ptr
<
FeatureDetector
>
fd
=
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.FAST"
);
Ptr
<
FeatureDetector
>
fd
=
FastFeatureDetector
::
create
(
20
,
true
,
type
);
ASSERT_FALSE
(
fd
.
empty
()
);
fd
->
set
(
"threshold"
,
20
);
fd
->
set
(
"nonmaxSuppression"
,
true
);
fd
->
set
(
"type"
,
type
);
vector
<
KeyPoint
>
points
;
TEST_CYCLE
()
fd
->
detect
(
frame
,
points
);
...
...
modules/features2d/src/brisk.cpp
View file @
01d3848f
...
...
@@ -2099,7 +2099,7 @@ BriskLayer::BriskLayer(const BriskLayer& layer, int mode)
void
BriskLayer
::
getAgastPoints
(
int
threshold
,
std
::
vector
<
KeyPoint
>&
keypoints
)
{
fast_9_16_
=
FastFeatureDetector
::
create
(
threshold
);
fast_9_16_
->
set
(
FastFeatureDetector
::
THRESHOLD
,
threshold
);
fast_9_16_
->
detect
(
img_
,
keypoints
);
// also write scores
...
...
modules/features2d/src/fast.cpp
View file @
01d3848f
...
...
@@ -383,6 +383,30 @@ public:
KeyPointsFilter
::
runByPixelsMask
(
keypoints
,
mask
);
}
void
set
(
int
prop
,
double
value
)
{
if
(
prop
==
THRESHOLD
)
threshold
=
cvRound
(
value
);
else
if
(
prop
==
NONMAX_SUPPRESSION
)
nonmaxSuppression
=
value
!=
0
;
else
if
(
prop
==
FAST_N
)
type
=
cvRound
(
value
);
else
CV_Error
(
Error
::
StsBadArg
,
""
);
}
double
get
(
int
prop
)
const
{
if
(
prop
==
THRESHOLD
)
return
threshold
;
if
(
prop
==
NONMAX_SUPPRESSION
)
return
nonmaxSuppression
;
if
(
prop
==
FAST_N
)
return
type
;
CV_Error
(
Error
::
StsBadArg
,
""
);
return
0
;
}
int
threshold
;
bool
nonmaxSuppression
;
int
type
;
...
...
modules/features2d/src/mser.cpp
View file @
01d3848f
...
...
@@ -800,9 +800,12 @@ extractMSER_8uC3( const Mat& src, Mat& labels,
double
emean
=
0
;
Mat
dx
(
src
.
rows
,
src
.
cols
-
1
,
CV_32FC1
);
Mat
dy
(
src
.
rows
,
src
.
cols
,
CV_32FC1
);
Ne
=
preprocessMSER_8UC3
(
map
,
edge
,
emean
,
src
,
dx
,
dy
,
Ne
,
params
.
edgeBlurSize
);
emean
=
emean
/
(
double
)
Ne
;
std
::
sort
(
edge
,
edge
+
Ne
,
LessThanEdge
());
MSCREdge
*
edge_ub
=
edge
+
Ne
;
MSCREdge
*
edgeptr
=
edge
;
TempMSCR
*
mscrptr
=
mscr
;
...
...
modules/features2d/test/test_descriptors_regression.cpp
View file @
01d3848f
...
...
@@ -106,8 +106,6 @@ public:
~
CV_DescriptorExtractorTest
()
{
if
(
!
detector
.
empty
())
detector
.
release
();
}
protected
:
virtual
void
createDescriptorExtractor
()
{}
...
...
@@ -333,7 +331,7 @@ TEST( Features2d_DescriptorExtractor_KAZE, regression )
{
CV_DescriptorExtractorTest
<
L2
<
float
>
>
test
(
"descriptor-kaze"
,
0.03
f
,
KAZE
::
create
(),
L2
<
float
>
()
);
L2
<
float
>
()
,
KAZE
::
create
()
);
test
.
safe_run
();
}
...
...
modules/features2d/test/test_keypoints.cpp
View file @
01d3848f
This diff is collapsed.
Click to expand it.
modules/features2d/test/test_matchers_algorithmic.cpp
View file @
01d3848f
...
...
@@ -533,13 +533,13 @@ void CV_DescriptorMatcherTest::run( int )
TEST
(
Features2d_DescriptorMatcher_BruteForce
,
regression
)
{
CV_DescriptorMatcherTest
test
(
"descriptor-matcher-brute-force"
,
DescriptorMatcher
::
create
(
"B
FMatcher
"
),
0.01
f
);
DescriptorMatcher
::
create
(
"B
ruteForce
"
),
0.01
f
);
test
.
safe_run
();
}
TEST
(
Features2d_DescriptorMatcher_FlannBased
,
regression
)
{
CV_DescriptorMatcherTest
test
(
"descriptor-matcher-flann-based"
,
DescriptorMatcher
::
create
(
"FlannBased
Matcher
"
),
0.04
f
);
DescriptorMatcher
::
create
(
"FlannBased"
),
0.04
f
);
test
.
safe_run
();
}
modules/features2d/test/test_rotation_and_scale_invariance.cpp
View file @
01d3848f
...
...
@@ -595,7 +595,7 @@ protected:
TEST
(
Features2d_RotationInvariance_Detector_BRISK
,
regression
)
{
DetectorRotationInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.BRISK"
),
DetectorRotationInvarianceTest
test
(
BRISK
::
create
(
),
0.32
f
,
0.76
f
);
test
.
safe_run
();
...
...
@@ -603,7 +603,7 @@ TEST(Features2d_RotationInvariance_Detector_BRISK, regression)
TEST
(
Features2d_RotationInvariance_Detector_ORB
,
regression
)
{
DetectorRotationInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.ORB"
),
DetectorRotationInvarianceTest
test
(
ORB
::
create
(
),
0.47
f
,
0.76
f
);
test
.
safe_run
();
...
...
modules/stitching/src/matchers.cpp
View file @
01d3848f
...
...
@@ -321,7 +321,7 @@ SurfFeaturesFinder::SurfFeaturesFinder(double hess_thresh, int num_octaves, int
{
if
(
num_octaves_descr
==
num_octaves
&&
num_layers_descr
==
num_layers
)
{
surf
=
Algorithm
::
create
<
Feature2D
>
(
"Feature2D.SURF"
);
surf
=
xfeatures2d
::
SURF
::
create
(
);
if
(
!
surf
)
CV_Error
(
Error
::
StsNotImplemented
,
"OpenCV was built without SURF support"
);
surf
->
set
(
"hessianThreshold"
,
hess_thresh
);
...
...
@@ -330,8 +330,8 @@ SurfFeaturesFinder::SurfFeaturesFinder(double hess_thresh, int num_octaves, int
}
else
{
detector_
=
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.SURF"
);
extractor_
=
Algorithm
::
create
<
DescriptorExtractor
>
(
"Feature2D.SURF"
);
detector_
=
xfeatures2d
::
SURF
::
create
(
);
extractor_
=
xfeatures2d
::
SURF
::
create
(
);
if
(
!
detector_
||
!
extractor_
)
CV_Error
(
Error
::
StsNotImplemented
,
"OpenCV was built without SURF support"
);
...
...
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