MCPcopy Create free account
hub / github.com/KAlO2/PerfectShow / merge

Function merge

jni/venus/opencv_utility.cpp:67–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67cv::Mat merge(const cv::Mat& rgb, const cv::Mat& alpha)
68{
69 assert(rgb.depth() == alpha.depth());
70 assert(rgb.channels() == 3 && alpha.channels() == 1);
71
72#if 1
73 cv::Mat r_g_b_a[3];
74 cv::split(rgb, r_g_b_a);
75 r_g_b_a[3] = alpha;
76
77 cv::Mat result;
78 cv::merge(r_g_b_a, 4, result);
79#else
80 // TODO maybe we can direct merge RGB and A???
81 cv::Mat result(rgb.size(), CV_MAKETYPE(rgb.depth(), 4));
82 for()
83 rgb.elemSize();
84#endif
85
86 return result;
87}
88
89void line(Mat& image, const Point2f& pt0, const Point2f& pt1, const Scalar& color,
90 int thickness/* = 1*/, int lineType/* = cv::LINE_8*/, int shift/* = 0*/)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected