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
19462c87
Commit
19462c87
authored
Aug 15, 2012
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forbid incorrect patchSize values in gpu::ORB
parent
528ddb56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
orb.cpp
modules/gpu/src/orb.cpp
+3
-1
No files found.
modules/gpu/src/orb.cpp
View file @
19462c87
...
@@ -401,6 +401,8 @@ cv::gpu::ORB_GPU::ORB_GPU(int nFeatures, float scaleFactor, int nLevels, int edg
...
@@ -401,6 +401,8 @@ cv::gpu::ORB_GPU::ORB_GPU(int nFeatures, float scaleFactor, int nLevels, int edg
scoreType_
(
scoreType
),
patchSize_
(
patchSize
),
scoreType_
(
scoreType
),
patchSize_
(
patchSize
),
fastDetector_
(
DEFAULT_FAST_THRESHOLD
)
fastDetector_
(
DEFAULT_FAST_THRESHOLD
)
{
{
CV_Assert
(
patchSize_
>=
2
);
// fill the extractors and descriptors for the corresponding scales
// fill the extractors and descriptors for the corresponding scales
float
factor
=
1.0
f
/
scaleFactor_
;
float
factor
=
1.0
f
/
scaleFactor_
;
float
n_desired_features_per_scale
=
nFeatures_
*
(
1.0
f
-
factor
)
/
(
1.0
f
-
std
::
pow
(
factor
,
nLevels_
));
float
n_desired_features_per_scale
=
nFeatures_
*
(
1.0
f
-
factor
)
/
(
1.0
f
-
std
::
pow
(
factor
,
nLevels_
));
...
@@ -417,7 +419,7 @@ cv::gpu::ORB_GPU::ORB_GPU(int nFeatures, float scaleFactor, int nLevels, int edg
...
@@ -417,7 +419,7 @@ cv::gpu::ORB_GPU::ORB_GPU(int nFeatures, float scaleFactor, int nLevels, int edg
// pre-compute the end of a row in a circular patch
// pre-compute the end of a row in a circular patch
int
half_patch_size
=
patchSize_
/
2
;
int
half_patch_size
=
patchSize_
/
2
;
vector
<
int
>
u_max
(
half_patch_size
+
1
);
vector
<
int
>
u_max
(
half_patch_size
+
2
);
for
(
int
v
=
0
;
v
<=
half_patch_size
*
std
::
sqrt
(
2.
f
)
/
2
+
1
;
++
v
)
for
(
int
v
=
0
;
v
<=
half_patch_size
*
std
::
sqrt
(
2.
f
)
/
2
+
1
;
++
v
)
u_max
[
v
]
=
cvRound
(
std
::
sqrt
(
static_cast
<
float
>
(
half_patch_size
*
half_patch_size
-
v
*
v
)));
u_max
[
v
]
=
cvRound
(
std
::
sqrt
(
static_cast
<
float
>
(
half_patch_size
*
half_patch_size
-
v
*
v
)));
...
...
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