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
f10c3389
Commit
f10c3389
authored
Nov 01, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added another draw_fhog() overload.
parent
555b7c8a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
fhog.h
dlib/image_transforms/fhog.h
+27
-0
fhog_abstract.h
dlib/image_transforms/fhog_abstract.h
+17
-0
No files found.
dlib/image_transforms/fhog.h
View file @
f10c3389
...
...
@@ -494,6 +494,33 @@ namespace dlib
return
matrix_cast
<
unsigned
char
>
(
upperbound
(
round
(
himg
*
255
/
thresh
),
255
));
}
// ----------------------------------------------------------------------------------------
template
<
typename
T
>
matrix
<
unsigned
char
>
draw_fhog
(
const
std
::
vector
<
matrix
<
T
>
>&
hog
,
const
long
w
=
15
)
{
// Just convert the input into the right object and then call the above draw_fhog()
// function on it.
dlib
::
array
<
array2d
<
T
>
>
temp
(
hog
.
size
());
for
(
unsigned
long
i
=
0
;
i
<
temp
.
size
();
++
i
)
{
temp
[
i
].
set_size
(
hog
[
i
].
nr
(),
hog
[
i
].
nc
());
for
(
long
r
=
0
;
r
<
hog
[
i
].
nr
();
++
r
)
{
for
(
long
c
=
0
;
c
<
hog
[
i
].
nc
();
++
c
)
{
temp
[
i
][
r
][
c
]
=
hog
[
i
](
r
,
c
);
}
}
}
return
draw_fhog
(
temp
,
w
);
}
// ----------------------------------------------------------------------------------------
template
<
...
...
dlib/image_transforms/fhog_abstract.h
View file @
f10c3389
...
...
@@ -175,6 +175,23 @@ namespace dlib
pixels wide and tall.
!*/
// ----------------------------------------------------------------------------------------
template
<
typename
T
>
matrix
<
unsigned
char
>
draw_fhog
(
const
std
::
vector
<
matrix
<
T
>
>&
hog
,
const
long
cell_draw_size
=
15
);
/*!
requires
- cell_draw_size > 0
ensures
- This function just converts the given hog object into an array<array2d<T>>
and passes it to the above draw_fhog() routine and returns the results.
!*/
// ----------------------------------------------------------------------------------------
template
<
...
...
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