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
5165ae1b
"torchvision/git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "8a820172393b1a1c06411f359dba7a305fd9a9b7"
Commit
5165ae1b
authored
Mar 26, 2016
by
Davis King
Browse files
Merged and also updated documentation to reflect these changes.
parents
750aaa32
14d34ec9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
9 deletions
+21
-9
dlib/image_transforms/fhog.h
dlib/image_transforms/fhog.h
+9
-6
dlib/image_transforms/fhog_abstract.h
dlib/image_transforms/fhog_abstract.h
+12
-3
No files found.
dlib/image_transforms/fhog.h
View file @
5165ae1b
...
...
@@ -1058,7 +1058,8 @@ namespace dlib
>
matrix
<
unsigned
char
>
draw_fhog
(
const
dlib
::
array
<
array2d
<
T
,
mm1
>
,
mm2
>&
hog
,
const
long
cell_draw_size
=
15
const
long
cell_draw_size
=
15
,
const
float
min_response_threshold
=
0.0
)
{
// make sure requires clause is not broken
...
...
@@ -1084,7 +1085,7 @@ namespace dlib
const
float
val
=
hog
[
d
][
r
/
cell_draw_size
][
c
/
cell_draw_size
]
+
hog
[
d
+
mbars
.
size
()][
r
/
cell_draw_size
][
c
/
cell_draw_size
]
+
hog
[
d
+
mbars
.
size
()
*
2
][
r
/
cell_draw_size
][
c
/
cell_draw_size
];
if
(
val
>
0
)
if
(
val
>
min_response_threshold
)
{
set_subm
(
himg
,
r
,
c
,
cell_draw_size
,
cell_draw_size
)
+=
val
*
mbars
[
d
%
mbars
.
size
()];
}
...
...
@@ -1106,7 +1107,8 @@ namespace dlib
>
matrix
<
unsigned
char
>
draw_fhog
(
const
std
::
vector
<
matrix
<
T
>
>&
hog
,
const
long
cell_draw_size
=
15
const
long
cell_draw_size
=
15
,
const
float
min_response_threshold
=
0.0
)
{
// make sure requires clause is not broken
...
...
@@ -1131,7 +1133,7 @@ namespace dlib
}
}
}
return
draw_fhog
(
temp
,
cell_draw_size
);
return
draw_fhog
(
temp
,
cell_draw_size
,
min_response_threshold
);
}
// ----------------------------------------------------------------------------------------
...
...
@@ -1142,7 +1144,8 @@ namespace dlib
>
matrix
<
unsigned
char
>
draw_fhog
(
const
array2d
<
matrix
<
T
,
31
,
1
>
,
mm
>&
hog
,
const
long
cell_draw_size
=
15
const
long
cell_draw_size
=
15
,
const
float
min_response_threshold
=
0.0
)
{
// make sure requires clause is not broken
...
...
@@ -1167,7 +1170,7 @@ namespace dlib
const
float
val
=
hog
[
r
/
cell_draw_size
][
c
/
cell_draw_size
](
d
)
+
hog
[
r
/
cell_draw_size
][
c
/
cell_draw_size
](
d
+
mbars
.
size
())
+
hog
[
r
/
cell_draw_size
][
c
/
cell_draw_size
](
d
+
mbars
.
size
()
*
2
);
if
(
val
>
0
)
if
(
val
>
min_response_threshold
)
{
set_subm
(
himg
,
r
,
c
,
cell_draw_size
,
cell_draw_size
)
+=
val
*
mbars
[
d
%
mbars
.
size
()];
}
...
...
dlib/image_transforms/fhog_abstract.h
View file @
5165ae1b
...
...
@@ -271,7 +271,8 @@ namespace dlib
>
matrix
<
unsigned
char
>
draw_fhog
(
const
dlib
::
array
<
array2d
<
T
,
mm1
>
,
mm2
>&
hog
,
const
long
cell_draw_size
=
15
const
long
cell_draw_size
=
15
,
const
float
min_response_threshold
=
0.0
);
/*!
requires
...
...
@@ -285,6 +286,8 @@ namespace dlib
then returned.
- The size of the cells in the output image will be rendered as cell_draw_size
pixels wide and tall.
- HOG cells with a response value less than min_response_threshold are not
drawn.
!*/
// ----------------------------------------------------------------------------------------
...
...
@@ -294,7 +297,8 @@ namespace dlib
>
matrix
<
unsigned
char
>
draw_fhog
(
const
std
::
vector
<
matrix
<
T
>
>&
hog
,
const
long
cell_draw_size
=
15
const
long
cell_draw_size
=
15
,
const
float
min_response_threshold
=
0.0
);
/*!
requires
...
...
@@ -303,6 +307,8 @@ namespace dlib
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.
- HOG cells with a response value less than min_response_threshold are not
drawn.
!*/
// ----------------------------------------------------------------------------------------
...
...
@@ -313,7 +319,8 @@ namespace dlib
>
matrix
<
unsigned
char
>
draw_fhog
(
const
array2d
<
matrix
<
T
,
31
,
1
>
,
mm
>&
hog
,
const
long
cell_draw_size
=
15
const
long
cell_draw_size
=
15
,
const
float
min_response_threshold
=
0.0
);
/*!
requires
...
...
@@ -326,6 +333,8 @@ namespace dlib
then returned.
- The size of the cells in the output image will be rendered as cell_draw_size
pixels wide and tall.
- HOG cells with a response value less than min_response_threshold are not
drawn.
!*/
// ----------------------------------------------------------------------------------------
...
...
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