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
3ed829af
Commit
3ed829af
authored
Jun 02, 2011
by
Vincent Rabaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- make sure we deal with a grayscale image
parent
ff13c9f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
orb.cpp
modules/features2d/src/orb.cpp
+5
-4
No files found.
modules/features2d/src/orb.cpp
View file @
3ed829af
...
...
@@ -545,12 +545,16 @@ void ORB::operator()(const cv::Mat &image, const cv::Mat &mask, std::vector<cv::
* @param do_keypoints if true, the keypoints are computed, otherwise used as an input
* @param do_descriptors if true, also computes the descriptors
*/
void
ORB
::
operator
()(
const
cv
::
Mat
&
image
,
const
cv
::
Mat
&
mask
,
std
::
vector
<
cv
::
KeyPoint
>
&
keypoints_in_out
,
void
ORB
::
operator
()(
const
cv
::
Mat
&
image
_in
,
const
cv
::
Mat
&
mask
,
std
::
vector
<
cv
::
KeyPoint
>
&
keypoints_in_out
,
cv
::
Mat
&
descriptors
,
bool
do_keypoints
,
bool
do_descriptors
)
{
if
((
!
do_keypoints
)
&&
(
!
do_descriptors
))
return
;
cv
::
Mat
image
;
if
(
image_in
.
type
()
!=
CV_8UC1
)
cvtColor
(
image_in
,
image
,
CV_BGR2GRAY
);
if
(
do_descriptors
)
descriptors
.
release
();
...
...
@@ -716,9 +720,6 @@ void ORB::computeKeyPoints(const std::vector<cv::Mat>& image_pyramid, const std:
void
ORB
::
computeOrientation
(
const
cv
::
Mat
&
image
,
const
cv
::
Mat
&
integral_image
,
unsigned
int
scale
,
std
::
vector
<
cv
::
KeyPoint
>&
keypoints
)
const
{
// If using the integral image, some offsets will be pre-computed for speed
std
::
vector
<
int
>
horizontal_offsets
(
8
*
half_patch_size_
),
vertical_offsets
(
8
*
half_patch_size_
);
// Process each keypoint
for
(
std
::
vector
<
cv
::
KeyPoint
>::
iterator
keypoint
=
keypoints
.
begin
(),
keypoint_end
=
keypoints
.
end
();
keypoint
!=
keypoint_end
;
++
keypoint
)
...
...
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