Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
f5ddbbf6
Commit
f5ddbbf6
authored
Jun 08, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11722 from gnthibault:3.4
parents
1187a7fa
b46fef32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
resize.cpp
modules/imgproc/src/resize.cpp
+5
-5
No files found.
modules/imgproc/src/resize.cpp
View file @
f5ddbbf6
...
...
@@ -3672,7 +3672,7 @@ void resize(int src_type,
{
CV_INSTRUMENT_REGION
()
CV_Assert
((
dst_width
*
dst_height
>
0
)
||
(
inv_scale_x
>
0
&&
inv_scale_y
>
0
));
CV_Assert
((
dst_width
>
0
&&
dst_height
>
0
)
||
(
inv_scale_x
>
0
&&
inv_scale_y
>
0
));
if
(
inv_scale_x
<
DBL_EPSILON
||
inv_scale_y
<
DBL_EPSILON
)
{
inv_scale_x
=
static_cast
<
double
>
(
dst_width
)
/
src_width
;
...
...
@@ -3684,7 +3684,7 @@ void resize(int src_type,
int
depth
=
CV_MAT_DEPTH
(
src_type
),
cn
=
CV_MAT_CN
(
src_type
);
Size
dsize
=
Size
(
saturate_cast
<
int
>
(
src_width
*
inv_scale_x
),
saturate_cast
<
int
>
(
src_height
*
inv_scale_y
));
CV_Assert
(
dsize
.
area
()
>
0
);
CV_Assert
(
!
dsize
.
empty
()
);
CV_IPP_RUN_FAST
(
ipp_resize
(
src_data
,
src_step
,
src_width
,
src_height
,
dst_data
,
dst_step
,
dsize
.
width
,
dsize
.
height
,
inv_scale_x
,
inv_scale_y
,
depth
,
cn
,
interpolation
))
...
...
@@ -4041,13 +4041,13 @@ void cv::resize( InputArray _src, OutputArray _dst, Size dsize,
Size
ssize
=
_src
.
size
();
CV_Assert
(
ssize
.
width
>
0
&&
ssize
.
height
>
0
);
CV_Assert
(
dsize
.
area
()
>
0
||
(
inv_scale_x
>
0
&&
inv_scale_y
>
0
)
);
CV_Assert
(
!
ssize
.
empty
()
);
CV_Assert
(
!
dsize
.
empty
()
||
(
inv_scale_x
>
0
&&
inv_scale_y
>
0
)
);
if
(
dsize
.
area
()
==
0
)
{
dsize
=
Size
(
saturate_cast
<
int
>
(
ssize
.
width
*
inv_scale_x
),
saturate_cast
<
int
>
(
ssize
.
height
*
inv_scale_y
));
CV_Assert
(
dsize
.
area
()
>
0
);
CV_Assert
(
!
dsize
.
empty
()
);
}
else
{
...
...
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