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
17e4d33b
Commit
17e4d33b
authored
Dec 25, 2015
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added regression test for #5876
parent
6997d423
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
test_arithm.cpp
modules/core/test/ocl/test_arithm.cpp
+16
-0
test_arithm.cpp
modules/core/test/test_arithm.cpp
+11
-0
No files found.
modules/core/test/ocl/test_arithm.cpp
View file @
17e4d33b
...
...
@@ -1885,6 +1885,22 @@ OCL_INSTANTIATE_TEST_CASE_P(Arithm, ReduceMin, Combine(testing::Values(std::make
OCL_ALL_CHANNELS
,
testing
::
Values
(
0
,
1
),
Bool
()));
// T-API BUG (haveOpenCL() is false): modules/core/src/matrix.cpp:212: error: (-215) u->refcount == 0 in function deallocate
OCL_TEST
(
Normalize
,
DISABLED_regression_5876_inplace_change_type
)
{
double
initial_values
[]
=
{
1
,
2
,
5
,
4
,
3
};
float
result_values
[]
=
{
0
,
0.25
,
1
,
0.75
,
0.5
};
Mat
m
(
Size
(
5
,
1
),
CV_64FC1
,
initial_values
);
Mat
result
(
Size
(
5
,
1
),
CV_32FC1
,
result_values
);
UMat
um
;
m
.
copyTo
(
um
);
UMat
uresult
;
result
.
copyTo
(
uresult
);
OCL_ON
(
normalize
(
um
,
um
,
1
,
0
,
NORM_MINMAX
,
CV_32F
));
EXPECT_EQ
(
0
,
cvtest
::
norm
(
um
,
uresult
,
NORM_INF
));
}
}
}
// namespace cvtest::ocl
#endif // HAVE_OPENCL
modules/core/test/test_arithm.cpp
View file @
17e4d33b
...
...
@@ -1833,3 +1833,14 @@ TEST(MinMaxLoc, Mat_IntMax_Without_Mask)
ASSERT_EQ
(
Point
(
0
,
0
),
minLoc
);
ASSERT_EQ
(
Point
(
0
,
0
),
maxLoc
);
}
TEST
(
Normalize
,
regression_5876_inplace_change_type
)
{
double
initial_values
[]
=
{
1
,
2
,
5
,
4
,
3
};
float
result_values
[]
=
{
0
,
0.25
,
1
,
0.75
,
0.5
};
Mat
m
(
Size
(
5
,
1
),
CV_64FC1
,
initial_values
);
Mat
result
(
Size
(
5
,
1
),
CV_32FC1
,
result_values
);
normalize
(
m
,
m
,
1
,
0
,
NORM_MINMAX
,
CV_32F
);
EXPECT_EQ
(
0
,
cvtest
::
norm
(
m
,
result
,
NORM_INF
));
}
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