mirror of
https://github.com/opencv/opencv.git
synced 2026-09-25 04:09:57 +03:00
Remove deprecated CommaInitializer API - #29948 This goes hand in hand with https://github.com/opencv/opencv_contrib/pull/4217 ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
19 lines
454 B
C++
19 lines
454 B
C++
#include "test_precomp.hpp"
|
|
|
|
namespace opencv_test { namespace {
|
|
|
|
TEST(MorphShapes, getStructuringElementDiamond)
|
|
{
|
|
cv::Mat element = cv::getStructuringElement(cv::MORPH_DIAMOND, cv::Size(5,5));
|
|
cv::Mat expected = cv::Mat_<uchar>({5, 5}, {
|
|
0,0,1,0,0,
|
|
0,1,1,1,0,
|
|
1,1,1,1,1,
|
|
0,1,1,1,0,
|
|
0,0,1,0,0
|
|
});
|
|
EXPECT_EQ(0, cvtest::norm(element, expected, cv::NORM_INF));
|
|
}
|
|
|
|
}} // namespace
|