Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
cae3da77
Commit
cae3da77
authored
Dec 31, 2011
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added an unload() to the hog_image.
parent
2eeaf11f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
hashed_feature_image.h
dlib/image_keypoint/hashed_feature_image.h
+4
-5
hog.h
dlib/image_keypoint/hog.h
+3
-0
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