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
c8aa81c2
Commit
c8aa81c2
authored
Oct 01, 2013
by
Davis King
Browse files
Set a default value for the cell size on image_to_fhog() and fhog_to_image().
parent
6d7f25bf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
dlib/image_transforms/fhog.h
dlib/image_transforms/fhog.h
+4
-4
dlib/image_transforms/fhog_abstract.h
dlib/image_transforms/fhog_abstract.h
+2
-2
No files found.
dlib/image_transforms/fhog.h
View file @
c8aa81c2
...
...
@@ -395,24 +395,24 @@ namespace dlib
inline
point
image_to_fhog
(
point
p
,
int
sbin
int
cell_size
=
8
)
{
// There is a one pixel border around the imag.
p
-=
point
(
1
,
1
);
// There is also a 1 "cell" border around the HOG image formation.
return
p
/
sbin
-
point
(
1
,
1
);
return
p
/
cell_size
-
point
(
1
,
1
);
}
// ----------------------------------------------------------------------------------------
inline
point
fhog_to_image
(
point
p
,
int
sbin
int
cell_size
=
8
)
{
// Convert to image space and then set to the center of the cell.
return
(
p
+
point
(
1
,
1
))
*
sbin
+
point
(
1
,
1
)
+
point
(
sbin
/
2
,
sbin
/
2
);
return
(
p
+
point
(
1
,
1
))
*
cell_size
+
point
(
1
,
1
)
+
point
(
cell_size
/
2
,
cell_size
/
2
);
}
// ----------------------------------------------------------------------------------------
...
...
dlib/image_transforms/fhog_abstract.h
View file @
c8aa81c2
...
...
@@ -83,7 +83,7 @@ namespace dlib
inline
point
image_to_fhog
(
point
p
,
int
cell_size
int
cell_size
=
8
);
/*!
requires
...
...
@@ -104,7 +104,7 @@ namespace dlib
inline
point
fhog_to_image
(
point
p
,
int
cell_size
int
cell_size
=
8
);
/*!
requires
...
...
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