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
c8aa81c2
Commit
c8aa81c2
authored
Oct 02, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set a default value for the cell size on image_to_fhog() and fhog_to_image().
parent
6d7f25bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
fhog.h
dlib/image_transforms/fhog.h
+4
-4
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