mirror of
https://github.com/opencv/opencv.git
synced 2026-09-15 07:29:07 -05:00
Merge pull request #18652 from OrestChura:oc/morphologyEx
[G-API]: morphologyEx() Standard Kernel Implementation * cv::gapi::morphologyEx() kernel - implemented (without separate 3x3 version) - tests added: check only different operations, not kernels/borders * Address comments: add `const` where needed * Replaced fundamental tyeps -> enums where needed - added operator<< overload for cv::MorphTypes for tests output
This commit is contained in:
@@ -848,6 +848,25 @@ inline std::ostream& operator<<(std::ostream& os, NormTypes op)
|
||||
#undef CASE
|
||||
return os;
|
||||
}
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& os, MorphTypes op)
|
||||
{
|
||||
#define CASE(v) case MorphTypes::v: os << #v; break
|
||||
switch (op)
|
||||
{
|
||||
CASE(MORPH_ERODE);
|
||||
CASE(MORPH_DILATE);
|
||||
CASE(MORPH_OPEN);
|
||||
CASE(MORPH_CLOSE);
|
||||
CASE(MORPH_GRADIENT);
|
||||
CASE(MORPH_TOPHAT);
|
||||
CASE(MORPH_BLACKHAT);
|
||||
CASE(MORPH_HITMISS);
|
||||
default: GAPI_Assert(false && "unknown MorphTypes value");
|
||||
}
|
||||
#undef CASE
|
||||
return os;
|
||||
}
|
||||
} // namespace cv
|
||||
|
||||
#endif //OPENCV_GAPI_TESTS_COMMON_HPP
|
||||
|
||||
Reference in New Issue
Block a user