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
baf193a5
You need to sign in or sign up before continuing.
Commit
baf193a5
authored
Feb 12, 2015
by
Davis King
Browse files
Made rectangle implicitly convertible to a chip_details.
parent
5f7007cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
dlib/image_transforms/interpolation.h
dlib/image_transforms/interpolation.h
+1
-0
dlib/image_transforms/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