We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 405aa9b commit f24a6b6Copy full SHA for f24a6b6
modules/ximgproc/src/globalmatting.cpp
@@ -8,6 +8,27 @@ namespace cv
8
{
9
namespace ximgproc
10
11
+
12
+struct IntensityComp
13
+{
14
+ IntensityComp(const cv::Mat_<cv::Vec3b> &image) : image(image)
15
+ {
16
17
+ }
18
19
+ bool operator()(const cv::Point &p0, const cv::Point &p1) const
20
21
+ const cv::Vec3b &c0 = image(p0.y, p0.x);
22
+ const cv::Vec3b &c1 = image(p1.y, p1.x);
23
24
+ return ((int)c0[0] + (int)c0[1] + (int)c0[2]) < ((int)c1[0] + (int)c1[1] + (int)c1[2]);
25
26
27
+ const cv::Mat_<cv::Vec3b> ℑ
28
+};
29
30
31
32
std::vector<cv::Point> GlobalMatting::findBoundaryPixels(const cv::Mat_<uchar> &trimap, int a, int b)
33
34
std::vector<cv::Point> result;
0 commit comments