@@ -57,128 +57,76 @@ namespace cv
57
57
58
58
// ! @addtogroup viz
59
59
// ! @{
60
+
60
61
/* * @brief This class represents color in BGR order.
61
62
*/
62
- class Color : public Scalar
63
+ class CV_EXPORTS_W_SIMPLE Color
64
+ #ifndef OPENCV_BINDING_PARSER
65
+ : public Scalar
66
+ #endif
63
67
{
64
68
public:
65
- Color ();
69
+ CV_WRAP Color ();
66
70
// ! The three channels will have the same value equal to gray.
67
- Color (double gray);
68
- Color (double blue, double green, double red);
71
+ CV_WRAP Color (double gray);
72
+ CV_WRAP Color (double blue, double green, double red);
69
73
70
74
Color (const Scalar& color);
71
75
72
76
operator Vec3b () const ;
73
77
74
- static Color black ();
75
- static Color blue ();
76
- static Color green ();
77
- static Color red ();
78
- static Color cyan ();
79
- static Color yellow ();
80
- static Color magenta ();
81
- static Color white ();
82
-
83
- static Color gray ();
84
- static Color silver ();
85
-
86
- static Color mlab ();
87
-
88
- static Color navy ();
89
- static Color maroon ();
90
- static Color teal ();
91
- static Color olive ();
92
- static Color purple ();
93
- static Color azure ();
94
- static Color chartreuse ();
95
- static Color rose ();
96
-
97
- static Color lime ();
98
- static Color gold ();
99
- static Color orange ();
100
- static Color orange_red ();
101
- static Color indigo ();
102
-
103
- static Color brown ();
104
- static Color apricot ();
105
- static Color pink ();
106
- static Color raspberry ();
107
- static Color cherry ();
108
- static Color violet ();
109
- static Color amethyst ();
110
- static Color bluberry ();
111
- static Color celestial_blue ();
112
- static Color turquoise ();
113
-
114
- static Color not_set ();
115
- };
116
-
117
- struct CV_EXPORTS_W_SIMPLE PyColor
118
- {
119
- // ! The three channels will have the same value equal to gray.
120
- CV_WRAP PyColor () { c = Color (0 , 0 , 0 ); };
121
- CV_WRAP PyColor (double gray) { c = Color (gray, gray, gray); };
122
- CV_WRAP PyColor (double blue, double green, double red) { c = Color (blue, green, red); }
123
- PyColor (Color v) { c = v; }
124
-
125
- /* Color get() { return c; };*/
126
-
127
- CV_WRAP static PyColor black () { return PyColor (Color::black ()); }
128
- CV_WRAP static PyColor white () { return PyColor (Color::white ()); }
129
- CV_WRAP static PyColor blue () { return PyColor (Color::blue ()); }
130
- CV_WRAP static PyColor green () { return PyColor (Color::green ()); }
131
- CV_WRAP static PyColor red () { return PyColor (Color::red ()); }
132
- CV_WRAP static PyColor cyan () { return PyColor (Color::cyan ()); }
133
- CV_WRAP static PyColor yellow () { return PyColor (Color::yellow ()); }
134
- CV_WRAP static PyColor magenta () { return PyColor (Color::magenta ()); }
135
-
136
- CV_WRAP static PyColor gray () { return PyColor (Color::gray ()); }
137
- CV_WRAP static PyColor silver () { return PyColor (Color::silver ()); }
138
-
139
- CV_WRAP static PyColor mlab () { return PyColor (Color::mlab ()); }
140
-
141
- CV_WRAP static PyColor navy () { return PyColor (Color::navy ()); }
142
- CV_WRAP static PyColor maroon () { return PyColor (Color::maroon ()); }
143
- CV_WRAP static PyColor teal () { return PyColor (Color::teal ()); }
144
- CV_WRAP static PyColor olive () { return PyColor (Color::olive ()); };
145
- CV_WRAP static PyColor purple () { return PyColor (Color::olive ()); };
146
- CV_WRAP static PyColor azure () { return PyColor (Color::olive ()); };
147
- CV_WRAP static PyColor chartreuse () { return PyColor (Color::olive ()); };
148
- CV_WRAP static PyColor rose () { return PyColor (Color::olive ()); };
149
-
150
- CV_WRAP static PyColor lime () { return PyColor (Color::olive ()); };
151
- CV_WRAP static PyColor gold () { return PyColor (Color::olive ()); };
152
- CV_WRAP static PyColor orange () { return PyColor (Color::olive ()); };
153
- CV_WRAP static PyColor orange_red () { return PyColor (Color::olive ()); };
154
- CV_WRAP static PyColor indigo () { return PyColor (Color::olive ()); };
155
-
156
- CV_WRAP static PyColor brown () { return PyColor (Color::olive ()); };
157
- CV_WRAP static PyColor apricot () { return PyColor (Color::olive ()); };
158
- CV_WRAP static PyColor pink () { return PyColor (Color::olive ()); };
159
- CV_WRAP static PyColor raspberry () { return PyColor (Color::olive ()); };
160
- CV_WRAP static PyColor cherry () { return PyColor (Color::olive ()); };
161
- CV_WRAP static PyColor violet () { return PyColor (Color::olive ()); };
162
- CV_WRAP static PyColor amethyst () { return PyColor (Color::amethyst ()); };
163
- CV_WRAP static PyColor bluberry () { return PyColor (Color::bluberry ()); };
164
- CV_WRAP static PyColor celestial_blue () { return PyColor (Color::celestial_blue ()); };
165
- CV_WRAP static PyColor turquoise () { return PyColor (Color::turquoise ()); };
166
-
167
- static PyColor not_set () { return PyColor (Color::not_set ()); };
168
- CV_WRAP double get_blue () { return c[0 ]; };
169
- CV_WRAP double get_green () { return c[1 ]; };
170
- CV_WRAP double get_red () { return c[2 ]; };
171
-
172
- Color c;
173
-
78
+ CV_WRAP static Color black ();
79
+ CV_WRAP static Color blue ();
80
+ CV_WRAP static Color green ();
81
+ CV_WRAP static Color red ();
82
+ CV_WRAP static Color cyan ();
83
+ CV_WRAP static Color yellow ();
84
+ CV_WRAP static Color magenta ();
85
+ CV_WRAP static Color white ();
86
+
87
+ CV_WRAP static Color gray ();
88
+ CV_WRAP static Color silver ();
89
+
90
+ CV_WRAP static Color mlab ();
91
+
92
+ CV_WRAP static Color navy ();
93
+ CV_WRAP static Color maroon ();
94
+ CV_WRAP static Color teal ();
95
+ CV_WRAP static Color olive ();
96
+ CV_WRAP static Color purple ();
97
+ CV_WRAP static Color azure ();
98
+ CV_WRAP static Color chartreuse ();
99
+ CV_WRAP static Color rose ();
100
+
101
+ CV_WRAP static Color lime ();
102
+ CV_WRAP static Color gold ();
103
+ CV_WRAP static Color orange ();
104
+ CV_WRAP static Color orange_red ();
105
+ CV_WRAP static Color indigo ();
106
+
107
+ CV_WRAP static Color brown ();
108
+ CV_WRAP static Color apricot ();
109
+ CV_WRAP static Color pink ();
110
+ CV_WRAP static Color raspberry ();
111
+ CV_WRAP static Color cherry ();
112
+ CV_WRAP static Color violet ();
113
+ CV_WRAP static Color amethyst ();
114
+ CV_WRAP static Color bluberry ();
115
+ CV_WRAP static Color celestial_blue ();
116
+ CV_WRAP static Color turquoise ();
117
+
118
+ CV_WRAP static Color not_set ();
119
+
120
+ CV_WRAP double get_blue () { return (*this )[0 ]; };
121
+ CV_WRAP double get_green () { return (*this )[1 ]; };
122
+ CV_WRAP double get_red () { return (*this )[2 ]; };
174
123
};
175
124
176
125
/* * @brief This class wraps mesh attributes, and it can load a mesh from a ply file. :
177
126
*/
178
127
class CV_EXPORTS_W_SIMPLE Mesh
179
128
{
180
129
public:
181
- CV_WRAP Mesh () {};
182
130
enum {
183
131
LOAD_AUTO = 0 ,
184
132
LOAD_PLY = 1 ,
@@ -196,6 +144,11 @@ namespace cv
196
144
CV_PROP_RW Mat texture;
197
145
CV_PROP_RW Mat tcoords; // !< CV_32FC2 or CV_64FC2 with only 1 row
198
146
147
+ CV_WRAP Mesh ()
148
+ {
149
+ // nothing
150
+ }
151
+
199
152
/* * @brief Loads a mesh from a ply or a obj file.
200
153
201
154
@param file File name
@@ -443,7 +396,6 @@ inline cv::viz::Color cv::viz::Color::turquoise() { return Color(208, 224,
443
396
444
397
inline cv::viz::Color cv::viz::Color::not_set () { return Color (-1 , -1 , -1 ); }
445
398
446
-
447
399
// ! @endcond
448
400
449
401
#endif
0 commit comments