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
de361671
Commit
de361671
authored
Oct 19, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added overloads of fhog_to_image() and image_to_fhog() that work on rectangles.
parent
075ed638
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
0 deletions
+50
-0
fhog.h
dlib/image_transforms/fhog.h
+22
-0
fhog_abstract.h
dlib/image_transforms/fhog_abstract.h
+28
-0
No files found.
dlib/image_transforms/fhog.h
View file @
de361671
...
...
@@ -415,6 +415,17 @@ namespace dlib
return
p
/
cell_size
-
point
(
1
,
1
);
}
// ----------------------------------------------------------------------------------------
inline
rectangle
image_to_fhog
(
const
rectangle
&
rect
,
int
cell_size
=
8
)
{
return
rectangle
(
image_to_fhog
(
rect
.
tl_corner
(),
cell_size
),
image_to_fhog
(
rect
.
br_corner
(),
cell_size
));
}
// ----------------------------------------------------------------------------------------
inline
point
fhog_to_image
(
...
...
@@ -426,6 +437,17 @@ namespace dlib
return
(
p
+
point
(
1
,
1
))
*
cell_size
+
point
(
1
,
1
)
+
point
(
cell_size
/
2
,
cell_size
/
2
);
}
// ----------------------------------------------------------------------------------------
inline
rectangle
fhog_to_image
(
const
rectangle
&
rect
,
int
cell_size
=
8
)
{
return
rectangle
(
fhog_to_image
(
rect
.
tl_corner
(),
cell_size
),
fhog_to_image
(
rect
.
br_corner
(),
cell_size
));
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
...
...
dlib/image_transforms/fhog_abstract.h
View file @
de361671
...
...
@@ -100,6 +100,20 @@ namespace dlib
input image.
!*/
// ----------------------------------------------------------------------------------------
inline
rectangle
image_to_fhog
(
const
rectangle
&
rect
,
int
cell_size
=
8
);
/*!
requires
- cell_size > 0
ensures
- maps a rectangle from image space to fhog space. In particular this function returns:
rectangle(image_to_fhog(rect.tl_corner(),cell_size), image_to_fhog(rect.br_corner(),cell_size))
!*/
// ----------------------------------------------------------------------------------------
inline
point
fhog_to_image
(
...
...
@@ -118,6 +132,20 @@ namespace dlib
cell_size should be set to the value used by the call to extract_fhog_features().
!*/
// ----------------------------------------------------------------------------------------
inline
rectangle
fhog_to_image
(
const
rectangle
&
rect
,
int
cell_size
=
8
);
/*!
requires
- cell_size > 0
ensures
- maps a rectangle from fhog space to image space. In particular this function returns:
rectangle(fhog_to_image(rect.tl_corner(),cell_size), fhog_to_image(rect.br_corner(),cell_size))
!*/
// ----------------------------------------------------------------------------------------
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