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
859ee608
Commit
859ee608
authored
Aug 15, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#2216 Forbid incorrect patchSize values in ORB
parent
b0927397
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
orb.cpp
modules/features2d/src/orb.cpp
+4
-2
No files found.
modules/features2d/src/orb.cpp
View file @
859ee608
...
@@ -633,7 +633,7 @@ static void computeKeyPoints(const vector<Mat>& imagePyramid,
...
@@ -633,7 +633,7 @@ static void computeKeyPoints(const vector<Mat>& imagePyramid,
// pre-compute the end of a row in a circular patch
// pre-compute the end of a row in a circular patch
int
halfPatchSize
=
patchSize
/
2
;
int
halfPatchSize
=
patchSize
/
2
;
vector
<
int
>
umax
(
halfPatchSize
+
1
);
vector
<
int
>
umax
(
halfPatchSize
+
2
);
int
v
,
v0
,
vmax
=
cvFloor
(
halfPatchSize
*
sqrt
(
2.
f
)
/
2
+
1
);
int
v
,
v0
,
vmax
=
cvFloor
(
halfPatchSize
*
sqrt
(
2.
f
)
/
2
+
1
);
int
vmin
=
cvCeil
(
halfPatchSize
*
sqrt
(
2.
f
)
/
2
);
int
vmin
=
cvCeil
(
halfPatchSize
*
sqrt
(
2.
f
)
/
2
);
...
@@ -643,7 +643,7 @@ static void computeKeyPoints(const vector<Mat>& imagePyramid,
...
@@ -643,7 +643,7 @@ static void computeKeyPoints(const vector<Mat>& imagePyramid,
// Make sure we are symmetric
// Make sure we are symmetric
for
(
v
=
halfPatchSize
,
v0
=
0
;
v
>=
vmin
;
--
v
)
for
(
v
=
halfPatchSize
,
v0
=
0
;
v
>=
vmin
;
--
v
)
{
{
while
(
umax
[
v0
]
==
umax
[
v0
+
1
])
while
(
umax
[
v0
]
==
umax
[
v0
+
1
])
++
v0
;
++
v0
;
umax
[
v
]
=
v0
;
umax
[
v
]
=
v0
;
++
v0
;
++
v0
;
...
@@ -723,6 +723,8 @@ static void computeDescriptors(const Mat& image, vector<KeyPoint>& keypoints, Ma
...
@@ -723,6 +723,8 @@ static void computeDescriptors(const Mat& image, vector<KeyPoint>& keypoints, Ma
void
ORB
::
operator
()(
InputArray
_image
,
InputArray
_mask
,
vector
<
KeyPoint
>&
_keypoints
,
void
ORB
::
operator
()(
InputArray
_image
,
InputArray
_mask
,
vector
<
KeyPoint
>&
_keypoints
,
OutputArray
_descriptors
,
bool
useProvidedKeypoints
)
const
OutputArray
_descriptors
,
bool
useProvidedKeypoints
)
const
{
{
CV_Assert
(
patchSize
>=
2
);
bool
do_keypoints
=
!
useProvidedKeypoints
;
bool
do_keypoints
=
!
useProvidedKeypoints
;
bool
do_descriptors
=
_descriptors
.
needed
();
bool
do_descriptors
=
_descriptors
.
needed
();
...
...
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