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
0ef11963
Commit
0ef11963
authored
Jan 12, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1514 from Sahloul:bug_fix/HarrisLaplace
parents
c14ee711
fa719d5d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
harris_lapace_detector.cpp
modules/xfeatures2d/src/harris_lapace_detector.cpp
+10
-6
No files found.
modules/xfeatures2d/src/harris_lapace_detector.cpp
View file @
0ef11963
...
...
@@ -73,7 +73,13 @@ public:
* _DOG: if true, a DOG pyramid is build
*/
Pyramid
::
Pyramid
(
const
Mat
&
img
,
int
octavesN_
,
int
layersN_
,
float
sigma0_
,
int
omin_
,
bool
_DOG
)
:
params
(
octavesN_
,
layersN_
,
sigma0_
,
omin_
)
params
(
//Need to set the octavesN parameter globally. See issue #1513
MIN
(
octavesN_
,
int
(
floor
(
log
((
double
)
MIN
(
img
.
size
().
width
,
img
.
size
().
height
))
/
log
(
2.0
f
)))),
layersN_
,
sigma0_
,
omin_
)
{
build
(
img
,
_DOG
);
}
...
...
@@ -89,9 +95,6 @@ void Pyramid::build(const Mat& img, bool DOG)
Size
ksize
(
0
,
0
);
int
gsize
;
Size
imgSize
=
img
.
size
();
int
minSize
=
MIN
(
imgSize
.
width
,
imgSize
.
height
);
int
octavesN
=
MIN
(
params
.
octavesN
,
int
(
floor
(
log
((
double
)
minSize
)
/
log
((
float
)
2
))));
float
sigma0
=
params
.
sigma0
;
float
sigma
=
sigma0
;
int
layersN
=
params
.
layersN
+
3
;
...
...
@@ -165,7 +168,7 @@ void Pyramid::build(const Mat& img, bool DOG)
/*for every octave build layers*/
sigma_prev
=
sigma
;
for
(
octave
=
0
;
octave
<
octavesN
;
octave
++
)
for
(
octave
=
0
;
octave
<
params
.
octavesN
;
octave
++
)
{
for
(
layer
=
1
;
layer
<
layersN
;
layer
++
)
{
...
...
@@ -411,7 +414,8 @@ void HarrisLaplaceFeatureDetector_Impl::detect(InputArray img, std::vector<KeyPo
keypoints
=
std
::
vector
<
KeyPoint
>
(
0
);
/*Find Harris corners on each layer*/
for
(
int
octave
=
0
;
octave
<=
numOctaves
;
octave
++
)
//Use pyr.params.octavesN instead of numOctaves. See issue #1513
for
(
int
octave
=
0
;
octave
<=
pyr
.
params
.
octavesN
;
octave
++
)
{
for
(
int
layer
=
1
;
layer
<=
num_layers
;
layer
++
)
{
...
...
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