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
7c2e74b6
Commit
7c2e74b6
authored
Jun 24, 2011
by
Vincent Rabaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fix a bug if the descriptor is used for images of different size
parent
c1940b4e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
26 deletions
+5
-26
orb.cpp
modules/features2d/src/orb.cpp
+5
-26
No files found.
modules/features2d/src/orb.cpp
View file @
7c2e74b6
...
...
@@ -381,24 +381,6 @@ public:
}
}
/** Compare the currently used normalized step of the integral image to a new one
* @param integral_image the integral we want to use the pattern on
* @return true if the two steps are equal
*/
bool
compareNormalizedStep
(
const
cv
::
Mat
&
integral_image
)
const
{
return
(
normalized_step_
==
integral_image
.
step1
());
}
/** Compare the currently used normalized step of the integral image to a new one
* @param step_size the normalized step size to compare to
* @return true if the two steps are equal
*/
bool
compareNormalizedStep
(
unsigned
int
normalized_step_size
)
const
{
return
(
normalized_step_
==
normalized_step_size
);
}
private
:
static
inline
int
angle2Wedge
(
float
angle
)
{
...
...
@@ -777,11 +759,11 @@ void ORB::computeIntegralImage(const cv::Mat & image, unsigned int level, cv::Ma
integral
(
image
,
integral_image
,
CV_32S
);
integral_image_steps_
.
resize
(
params_
.
n_levels_
,
0
);
if
(
integral_image_steps_
[
level
]
==
integral_image
.
step1
())
unsigned
int
integral_image_step
=
integral_image
.
step1
();
if
(
integral_image_steps_
[
level
]
==
integral_image_step
)
return
;
// If the integral image dimensions have changed, recompute everything
int
integral_image_step
=
integral_image
.
step1
();
// Cache the step sizes
integral_image_steps_
[
level
]
=
integral_image_step
;
...
...
@@ -815,13 +797,10 @@ void ORB::computeIntegralImage(const cv::Mat & image, unsigned int level, cv::Ma
// Remove the previous version if dimensions are different
patterns_
.
resize
(
params_
.
n_levels_
,
0
);
if
((
patterns_
[
level
])
&&
(
patterns_
[
level
]
->
compareNormalizedStep
(
integral_image
)))
{
if
(
patterns_
[
level
])
delete
patterns_
[
level
];
patterns_
[
level
]
=
0
;
}
if
(
!
patterns_
[
level
])
patterns_
[
level
]
=
new
OrbPatterns
(
params_
.
patch_size_
,
integral_image
.
step1
());
patterns_
[
level
]
=
new
OrbPatterns
(
params_
.
patch_size_
,
integral_image_step
);
}
/** Compute the ORB decriptors
...
...
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