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
cae3da77
Commit
cae3da77
authored
Dec 30, 2011
by
Davis King
Browse files
Added an unload() to the hog_image.
parent
2eeaf11f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
dlib/image_keypoint/hashed_feature_image.h
dlib/image_keypoint/hashed_feature_image.h
+4
-5
dlib/image_keypoint/hog.h
dlib/image_keypoint/hog.h
+3
-0
dlib/image_keypoint/hog_abstract.h
dlib/image_keypoint/hog_abstract.h
+19
-0
No files found.
dlib/image_keypoint/hashed_feature_image.h
View file @
cae3da77
...
...
@@ -245,18 +245,17 @@ namespace dlib
const
image_type
&
img
)
{
feature_extractor
fe_temp
;
fe_temp
.
copy_configuration
(
fe
);
fe_temp
.
load
(
img
);
fe
.
load
(
img
);
feats
.
set_size
(
fe
_temp
.
nr
(),
fe
_temp
.
nc
());
feats
.
set_size
(
fe
.
nr
(),
fe
.
nc
());
for
(
long
r
=
0
;
r
<
feats
.
nr
();
++
r
)
{
for
(
long
c
=
0
;
c
<
feats
.
nc
();
++
c
)
{
feats
[
r
][
c
]
=
phash
(
fe
_temp
(
r
,
c
));
feats
[
r
][
c
]
=
phash
(
fe
(
r
,
c
));
}
}
fe
.
unload
();
}
// ----------------------------------------------------------------------------------------
...
...
dlib/image_keypoint/hog.h
View file @
cae3da77
...
...
@@ -86,6 +86,9 @@ namespace dlib
load_impl
(
array_to_matrix
(
img
));
}
inline
void
unload
(
)
{
clear
();
}
inline
unsigned
long
size
(
)
const
{
return
static_cast
<
unsigned
long
>
(
nr
()
*
nc
());
}
...
...
dlib/image_keypoint/hog_abstract.h
View file @
cae3da77
...
...
@@ -169,6 +169,25 @@ namespace dlib
- #size() > 0
!*/
inline
void
unload
(
);
/*!
ensures
- #nr() == 0
- #nc() == 0
- clears only the state information which is populated by load(). For
example, let H be a hog_image object. Then consider the two sequences
of instructions:
Sequence 1:
H.load(img);
H.unload();
H.load(img);
Sequence 2:
H.load(img);
Both sequence 1 and sequence 2 should have the same effect on H.
!*/
inline
unsigned
long
size
(
)
const
;
/*!
...
...
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