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
c91959a7
Unverified
Commit
c91959a7
authored
Feb 03, 2022
by
Adrià Arrufat
Committed by
GitHub
Feb 02, 2022
Browse files
do not round drectangle in rectangle transform (#2498)
parent
027fb781
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
dlib/geometry/point_transforms.h
dlib/geometry/point_transforms.h
+3
-2
No files found.
dlib/geometry/point_transforms.h
View file @
c91959a7
...
@@ -235,14 +235,15 @@ namespace dlib
...
@@ -235,14 +235,15 @@ namespace dlib
// the above box.
// the above box.
double
scale
=
std
::
sqrt
(
new_area
/
temp
.
area
());
double
scale
=
std
::
sqrt
(
new_area
/
temp
.
area
());
return
centered_rect
(
center
(
temp
),
std
::
round
(
temp
.
width
()
*
scale
)
,
std
::
round
(
temp
.
height
()
*
scale
)
)
;
return
centered_
d
rect
(
d
center
(
temp
),
temp
.
width
()
*
scale
,
temp
.
height
()
*
scale
);
}
}
rectangle
operator
()
(
rectangle
operator
()
(
const
rectangle
&
r
const
rectangle
&
r
)
const
)
const
{
{
return
(
*
this
)(
drectangle
(
r
));
const
auto
temp
=
(
*
this
)(
drectangle
(
r
));
return
centered_rect
(
center
(
temp
),
std
::
round
(
temp
.
width
()),
std
::
round
(
temp
.
height
()));
}
}
const
point_transform_affine
&
get_tform
(
const
point_transform_affine
&
get_tform
(
...
...
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