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
baf193a5
Commit
baf193a5
authored
Feb 12, 2015
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made rectangle implicitly convertible to a chip_details.
parent
5f7007cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
interpolation.h
dlib/image_transforms/interpolation.h
+1
-0
interpolation_abstract.h
dlib/image_transforms/interpolation_abstract.h
+12
-0
No files found.
dlib/image_transforms/interpolation.h
View file @
baf193a5
...
@@ -1500,6 +1500,7 @@ namespace dlib
...
@@ -1500,6 +1500,7 @@ namespace dlib
struct
chip_details
struct
chip_details
{
{
chip_details
()
:
angle
(
0
),
rows
(
0
),
cols
(
0
)
{}
chip_details
()
:
angle
(
0
),
rows
(
0
),
cols
(
0
)
{}
chip_details
(
const
rectangle
&
rect_
)
:
rect
(
rect_
),
angle
(
0
),
rows
(
rect_
.
height
()),
cols
(
rect_
.
width
())
{}
chip_details
(
const
drectangle
&
rect_
)
:
rect
(
rect_
),
angle
(
0
),
rows
(
rect_
.
height
()),
cols
(
rect_
.
width
())
{}
chip_details
(
const
drectangle
&
rect_
)
:
rect
(
rect_
),
angle
(
0
),
rows
(
rect_
.
height
()),
cols
(
rect_
.
width
())
{}
chip_details
(
const
drectangle
&
rect_
,
unsigned
long
size
)
:
rect
(
rect_
),
angle
(
0
)
chip_details
(
const
drectangle
&
rect_
,
unsigned
long
size
)
:
rect
(
rect_
),
angle
(
0
)
{
compute_dims_from_size
(
size
);
}
{
compute_dims_from_size
(
size
);
}
...
...
dlib/image_transforms/interpolation_abstract.h
View file @
baf193a5
...
@@ -934,6 +934,18 @@ namespace dlib
...
@@ -934,6 +934,18 @@ namespace dlib
- #cols == rect_.width()
- #cols == rect_.width()
!*/
!*/
chip_details
(
const
rectangle
&
rect_
);
/*!
ensures
- #rect == rect_
- #size() == rect_.area()
- #angle == 0
- #rows == rect_.height()
- #cols == rect_.width()
!*/
chip_details
(
chip_details
(
const
drectangle
&
rect_
,
const
drectangle
&
rect_
,
unsigned
long
size_
unsigned
long
size_
...
...
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