Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
0b2bfdde
"examples/sampling/vscode:/vscode.git/clone" did not exist on "a1fb810e9b42f10cb0fd90fc2dcf9dc7849915d1"
Commit
0b2bfdde
authored
Jan 02, 2012
by
Davis King
Browse files
Made this code a little more robust.
parent
125a572c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
dlib/image_keypoint/hashed_feature_image.h
dlib/image_keypoint/hashed_feature_image.h
+12
-4
No files found.
dlib/image_keypoint/hashed_feature_image.h
View file @
0b2bfdde
...
...
@@ -247,14 +247,22 @@ namespace dlib
{
fe
.
load
(
img
);
feats
.
set_size
(
fe
.
nr
(),
fe
.
nc
());
for
(
long
r
=
0
;
r
<
feats
.
nr
();
++
r
)
if
(
fe
.
size
()
!=
0
)
{
for
(
long
c
=
0
;
c
<
feats
.
nc
();
++
c
)
feats
.
set_size
(
fe
.
nr
(),
fe
.
nc
());
for
(
long
r
=
0
;
r
<
feats
.
nr
();
++
r
)
{
feats
[
r
][
c
]
=
phash
(
fe
(
r
,
c
));
for
(
long
c
=
0
;
c
<
feats
.
nc
();
++
c
)
{
feats
[
r
][
c
]
=
phash
(
fe
(
r
,
c
));
}
}
}
else
{
feats
.
set_size
(
0
,
0
);
}
fe
.
unload
();
}
...
...
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