@@ -75,72 +75,163 @@ namespace cv { namespace cuda {
75
75
@param src1 First source matrix or scalar.
76
76
@param src2 Second source matrix or scalar. Matrix should have the same size and type as src1 .
77
77
@param dst Destination matrix that has the same size and number of channels as the input array(s).
78
- The depth is defined by dtype or src1 depth.
78
+ The depth is defined by dtype or @p src1 depth.
79
79
@param mask Optional operation mask, 8-bit single channel array, that specifies elements of the
80
80
destination array to be changed. The mask can be used only with single channel images.
81
81
@param dtype Optional depth of the output array.
82
82
@param stream Stream for the asynchronous version.
83
83
84
- @sa add
84
+ @warning In python both @p src1 and @p src2 have to be matrices, see @ref addWithScalar for scalar overload.
85
+
86
+ @sa cv::add, addWithScalar
85
87
*/
86
88
CV_EXPORTS_W void add (InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), int dtype = -1, Stream& stream = Stream::Null());
87
89
90
+ /* * @brief Computes a matrix-scalar sum.
91
+
92
+ @param src1 First source matrix.
93
+ @param src2 Second source scalar.
94
+ @param dst Destination matrix that has the same size and number of channels as the input array.
95
+ The depth is defined by dtype or @p src1 depth.
96
+ @param mask Optional operation mask, 8-bit single channel array, that specifies elements of the
97
+ destination array to be changed. The mask can be used only with single channel images.
98
+ @param dtype Optional depth of the output array.
99
+ @param stream Stream for the asynchronous version.
100
+
101
+ @sa add
102
+ */
103
+ CV_EXPORTS_W void inline addWithScalar (InputArray src1, Scalar src2, OutputArray dst, InputArray mask = noArray(), int dtype = -1, Stream& stream = Stream::Null()) {
104
+ add (src1, src2, dst, mask, dtype, stream);
105
+ }
106
+
88
107
/* * @brief Computes a matrix-matrix or matrix-scalar difference.
89
108
90
109
@param src1 First source matrix or scalar.
91
- @param src2 Second source matrix or scalar. Matrix should have the same size and type as src1 .
110
+ @param src2 Second source matrix or scalar. Matrix should have the same size and type as @p src1 .
92
111
@param dst Destination matrix that has the same size and number of channels as the input array(s).
93
- The depth is defined by dtype or src1 depth.
112
+ The depth is defined by dtype or @p src1 depth.
94
113
@param mask Optional operation mask, 8-bit single channel array, that specifies elements of the
95
114
destination array to be changed. The mask can be used only with single channel images.
96
115
@param dtype Optional depth of the output array.
97
116
@param stream Stream for the asynchronous version.
98
117
99
- @sa subtract
118
+ @warning In python both @p src1 and @p src2 have to be matrices, see @ref subtractWithScalar for scalar overload.
119
+
120
+ @sa cv::subtract, subtractWithScalar
100
121
*/
101
122
CV_EXPORTS_W void subtract (InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), int dtype = -1, Stream& stream = Stream::Null());
102
123
124
+ /* * @brief Computes matrix-scalar difference.
125
+
126
+ @param src1 First source matrix.
127
+ @param src2 Second source scalar.
128
+ @param dst Destination matrix that has the same size and number of channels as the input array.
129
+ The depth is defined by dtype or @p src1 depth.
130
+ @param mask Optional operation mask, 8-bit single channel array, that specifies elements of the
131
+ destination array to be changed. The mask can be used only with single channel images.
132
+ @param dtype Optional depth of the output array.
133
+ @param stream Stream for the asynchronous version.
134
+
135
+ @sa cv::subtract
136
+ */
137
+ CV_EXPORTS_W void inline subtractWithScalar (InputArray src1, Scalar src2, OutputArray dst, InputArray mask = noArray(), int dtype = -1, Stream& stream = Stream::Null()) {
138
+ subtract (src1, src2, dst, mask, dtype, stream);
139
+ }
140
+
103
141
/* * @brief Computes a matrix-matrix or matrix-scalar per-element product.
104
142
105
143
@param src1 First source matrix or scalar.
106
144
@param src2 Second source matrix or scalar.
107
145
@param dst Destination matrix that has the same size and number of channels as the input array(s).
108
- The depth is defined by dtype or src1 depth.
146
+ The depth is defined by dtype or @p src1 depth.
109
147
@param scale Optional scale factor.
110
148
@param dtype Optional depth of the output array.
111
149
@param stream Stream for the asynchronous version.
112
150
113
- @sa multiply
151
+ @warning In python both @p src1 and @p src2 have to be matrices, see @ref multiplyWithScalar for scalar overload.
152
+
153
+ @sa cv::multiply, multiplyWithScalar
114
154
*/
115
155
CV_EXPORTS_W void multiply (InputArray src1, InputArray src2, OutputArray dst, double scale = 1 , int dtype = -1 , Stream& stream = Stream::Null());
116
156
157
+ /* * @brief Computes a matrix-scalar per-element product.
158
+
159
+ @param src1 First source matrix.
160
+ @param src2 Second source scalar.
161
+ @param dst Destination matrix that has the same size and number of channels as the input array.
162
+ The depth is defined by dtype or @p src1 depth.
163
+ @param scale Optional scale factor.
164
+ @param dtype Optional depth of the output array.
165
+ @param stream Stream for the asynchronous version.
166
+
167
+ @sa multiply
168
+ */
169
+ CV_EXPORTS_W void inline multiplyWithScalar (InputArray src1, Scalar src2, OutputArray dst, double scale = 1 , int dtype = -1 , Stream& stream = Stream::Null()) {
170
+ multiply (src1, src2, dst, scale, dtype, stream);
171
+ }
172
+
117
173
/* * @brief Computes a matrix-matrix or matrix-scalar division.
118
174
119
- @param src1 First source matrix or a scalar.
175
+ @param src1 First source matrix or scalar.
120
176
@param src2 Second source matrix or scalar.
121
177
@param dst Destination matrix that has the same size and number of channels as the input array(s).
122
- The depth is defined by dtype or src1 depth.
178
+ The depth is defined by dtype or @p src1 depth.
123
179
@param scale Optional scale factor.
124
180
@param dtype Optional depth of the output array.
125
181
@param stream Stream for the asynchronous version.
126
182
127
183
This function, in contrast to divide, uses a round-down rounding mode.
128
184
129
- @sa divide
185
+ @warning In python both @p src1 and @p src2 have to be matrices, see @ref divideWithScalar for scalar overload.
186
+
187
+ @sa cv::divide, divideWithScalar
130
188
*/
131
189
CV_EXPORTS_W void divide (InputArray src1, InputArray src2, OutputArray dst, double scale = 1 , int dtype = -1 , Stream& stream = Stream::Null());
132
190
191
+ /* * @brief Computes a matrix-scalar division.
192
+
193
+ @param src1 First source matrix.
194
+ @param src2 Second source scalar.
195
+ @param dst Destination matrix that has the same size and number of channels as the input array.
196
+ The depth is defined by dtype or @p src1 depth.
197
+ @param scale Optional scale factor.
198
+ @param dtype Optional depth of the output array.
199
+ @param stream Stream for the asynchronous version.
200
+
201
+ This function, in contrast to divide, uses a round-down rounding mode.
202
+
203
+ @sa divide
204
+ */
205
+ CV_EXPORTS_W void inline divideWithScalar (InputArray src1, Scalar src2, OutputArray dst, double scale = 1 , int dtype = -1 , Stream& stream = Stream::Null()) {
206
+ divide (src1, src2, dst, scale, dtype, stream);
207
+ }
208
+
133
209
/* * @brief Computes per-element absolute difference of two matrices (or of a matrix and scalar).
134
210
135
211
@param src1 First source matrix or scalar.
136
212
@param src2 Second source matrix or scalar.
137
213
@param dst Destination matrix that has the same size and type as the input array(s).
138
214
@param stream Stream for the asynchronous version.
139
215
140
- @sa absdiff
216
+ @warning In python both @p src1 and @p src2 have to be matrices, see @ref absdiffWithScalar for scalar overload.
217
+
218
+ @sa cv::absdiff, absdiffWithScalar
141
219
*/
142
220
CV_EXPORTS_W void absdiff (InputArray src1, InputArray src2, OutputArray dst, Stream& stream = Stream::Null());
143
221
222
+ /* * @brief Computes per-element absolute difference of a matrix and scalar.
223
+
224
+ @param src1 First source matrix.
225
+ @param src2 Second source scalar.
226
+ @param dst Destination matrix that has the same size and type as the input array.
227
+ @param stream Stream for the asynchronous version.
228
+
229
+ @sa absdiff
230
+ */
231
+ CV_EXPORTS_W void inline absdiffWithScalar (InputArray src1, Scalar src2, OutputArray dst, Stream& stream = Stream::Null()) {
232
+ absdiff (src1, src2, dst, stream);
233
+ }
234
+
144
235
/* * @brief Computes an absolute value of each matrix element.
145
236
146
237
@param src Source matrix.
@@ -218,10 +309,32 @@ CV_EXPORTS_W void pow(InputArray src, double power, OutputArray dst, Stream& str
218
309
- **CMP_NE:** a(.) != b(.)
219
310
@param stream Stream for the asynchronous version.
220
311
221
- @sa compare
312
+ @warning In python both @p src1 and @p src2 have to be matrices, see @ref compareWithScalar for scalar overload.
313
+
314
+ @sa cv::compare, compareWithScalar
222
315
*/
223
316
CV_EXPORTS_W void compare (InputArray src1, InputArray src2, OutputArray dst, int cmpop, Stream& stream = Stream::Null());
224
317
318
+ /* * @brief Compares elements of a matrix and scalar.
319
+
320
+ @param src1 First source matrix.
321
+ @param src2 Second source scalar.
322
+ @param dst Destination matrix that has the same size as the input array and type \ref CV_8U.
323
+ @param cmpop Flag specifying the relation between the elements to be checked:
324
+ - **CMP_EQ:** a(.) == b(.)
325
+ - **CMP_GT:** a(.) \> b(.)
326
+ - **CMP_GE:** a(.) \>= b(.)
327
+ - **CMP_LT:** a(.) \< b(.)
328
+ - **CMP_LE:** a(.) \<= b(.)
329
+ - **CMP_NE:** a(.) != b(.)
330
+ @param stream Stream for the asynchronous version.
331
+
332
+ @sa compare
333
+ */
334
+ CV_EXPORTS_W void inline compareWithScalar (InputArray src1, Scalar src2, OutputArray dst, int cmpop, Stream& stream = Stream::Null()) {
335
+ compare (src1, src2, dst, cmpop, stream);
336
+ }
337
+
225
338
/* * @brief Performs a per-element bitwise inversion.
226
339
227
340
@param src Source matrix.
@@ -240,9 +353,28 @@ CV_EXPORTS_W void bitwise_not(InputArray src, OutputArray dst, InputArray mask =
240
353
@param mask Optional operation mask, 8-bit single channel array, that specifies elements of the
241
354
destination array to be changed. The mask can be used only with single channel images.
242
355
@param stream Stream for the asynchronous version.
356
+
357
+ @warning In python both @p src1 and @p src2 have to be matrices, see @ref bitwise_or_with_scalar for scalar overload.
358
+
359
+ @sa cv::bitwise_or, bitwise_or_with_scalar
243
360
*/
244
361
CV_EXPORTS_W void bitwise_or (InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null());
245
362
363
+ /* * @brief Performs a per-element bitwise disjunction of a matrix and scalar.
364
+
365
+ @param src1 First source matrix.
366
+ @param src2 Second source scalar.
367
+ @param dst Destination matrix that has the same size and type as the input array.
368
+ @param mask Optional operation mask, 8-bit single channel array, that specifies elements of the
369
+ destination array to be changed. The mask can be used only with single channel images.
370
+ @param stream Stream for the asynchronous version.
371
+
372
+ @sa bitwise_or
373
+ */
374
+ CV_EXPORTS_W void inline bitwise_or_with_scalar (InputArray src1, Scalar src2, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null()) {
375
+ bitwise_or (src1, src2, dst, mask, stream);
376
+ }
377
+
246
378
/* * @brief Performs a per-element bitwise conjunction of two matrices (or of matrix and scalar).
247
379
248
380
@param src1 First source matrix or scalar.
@@ -251,20 +383,58 @@ CV_EXPORTS_W void bitwise_or(InputArray src1, InputArray src2, OutputArray dst,
251
383
@param mask Optional operation mask, 8-bit single channel array, that specifies elements of the
252
384
destination array to be changed. The mask can be used only with single channel images.
253
385
@param stream Stream for the asynchronous version.
386
+
387
+ @warning In python both @p src1 and @p src2 have to be matrices, see @ref bitwise_and_with_scalar for scalar overload.
388
+
389
+ @sa bitwise_and_with_scalar
254
390
*/
255
391
CV_EXPORTS_W void bitwise_and (InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null());
256
392
393
+ /* * @brief Performs a per-element bitwise conjunction of a matrix and a scalar.
394
+
395
+ @param src1 First source matrix.
396
+ @param src2 Second source scalar.
397
+ @param dst Destination matrix that has the same size and type as the input array.
398
+ @param mask Optional operation mask, 8-bit single channel array, that specifies elements of the
399
+ destination array to be changed. The mask can be used only with single channel images.
400
+ @param stream Stream for the asynchronous version.
401
+
402
+ @sa bitwise_and
403
+ */
404
+ CV_EXPORTS_W void inline bitwise_and_with_scalar (InputArray src1, Scalar src2, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null()) {
405
+ bitwise_and (src1, src2, dst, mask, stream);
406
+ }
407
+
257
408
/* * @brief Performs a per-element bitwise exclusive or operation of two matrices (or of matrix and scalar).
258
409
259
410
@param src1 First source matrix or scalar.
260
411
@param src2 Second source matrix or scalar.
261
- @param dst Destination matrix that has the same size and type as the input array(s) .
412
+ @param dst Destination matrix that has the same size and type as the input array.
262
413
@param mask Optional operation mask, 8-bit single channel array, that specifies elements of the
263
414
destination array to be changed. The mask can be used only with single channel images.
264
415
@param stream Stream for the asynchronous version.
416
+
417
+ @warning In python both @p src1 and @p src2 have to be matrices, see @ref bitwise_xor_with_scalar for scalar overload.
418
+
419
+ @sa cv::bitwise_xor, bitwise_xor_with_scalar
265
420
*/
266
421
CV_EXPORTS_W void bitwise_xor (InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null());
267
422
423
+ /* * @brief Performs a per-element bitwise exclusive or operation of a matrix and a scalar.
424
+
425
+ @param src1 First source matrix.
426
+ @param src2 Second source scalar.
427
+ @param dst Destination matrix that has the same size and type as the input array(s).
428
+ @param mask Optional operation mask, 8-bit single channel array, that specifies elements of the
429
+ destination array to be changed. The mask can be used only with single channel images.
430
+ @param stream Stream for the asynchronous version.
431
+
432
+ @sa bitwise_xor
433
+ */
434
+ CV_EXPORTS_W void inline bitwise_xor_with_scalar (InputArray src1, Scalar src2, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null()) {
435
+ bitwise_xor (src1, src2, dst, mask, stream);
436
+ }
437
+
268
438
/* * @brief Performs pixel by pixel right shift of an image by a constant value.
269
439
270
440
@param src Source matrix. Supports 1, 3 and 4 channels images with integers elements.
@@ -299,21 +469,51 @@ CV_WRAP inline void lshift(InputArray src, Scalar val, OutputArray dst, Stream&
299
469
@param dst Destination matrix that has the same size and type as the input array(s).
300
470
@param stream Stream for the asynchronous version.
301
471
302
- @sa min
472
+ @warning In python both @p src1 and @p src2 have to be matrices, see @ref minWithScalar for scalar overload.
473
+
474
+ @sa cv::min, minWithScalar
303
475
*/
304
476
CV_EXPORTS_W void min (InputArray src1, InputArray src2, OutputArray dst, Stream& stream = Stream::Null());
305
477
478
+ /* * @brief Computes the per-element minimum or a matrix and a scalar.
479
+
480
+ @param src1 First source matrix.
481
+ @param src2 Second source scalar.
482
+ @param dst Destination matrix that has the same size and type as the input array.
483
+ @param stream Stream for the asynchronous version.
484
+
485
+ @sa min
486
+ */
487
+ CV_EXPORTS_W void inline minWithScalar (InputArray src1, Scalar src2, OutputArray dst, Stream& stream = Stream::Null()) {
488
+ min (src1, src2, dst, stream);
489
+ }
490
+
306
491
/* * @brief Computes the per-element maximum of two matrices (or a matrix and a scalar).
307
492
308
493
@param src1 First source matrix or scalar.
309
494
@param src2 Second source matrix or scalar.
310
495
@param dst Destination matrix that has the same size and type as the input array(s).
311
496
@param stream Stream for the asynchronous version.
312
497
313
- @sa max
498
+ @warning In python both @p src1 and @p src2 have to be matrices, see @ref maxWithScalar for scalar overload.
499
+
500
+ @sa cv::max, maxWithScalar
314
501
*/
315
502
CV_EXPORTS_W void max (InputArray src1, InputArray src2, OutputArray dst, Stream& stream = Stream::Null());
316
503
504
+ /* * @brief Computes the per-element maximum of a matrix and a scalar.
505
+
506
+ @param src1 First source matrix.
507
+ @param src2 Second source scalar.
508
+ @param dst Destination matrix that has the same size and type as the input array.
509
+ @param stream Stream for the asynchronous version.
510
+
511
+ @sa max
512
+ */
513
+ CV_EXPORTS_W void inline maxWithScalar (InputArray src1, Scalar src2, OutputArray dst, Stream& stream = Stream::Null()) {
514
+ max (src1, src2, dst, stream);
515
+ }
516
+
317
517
/* * @brief Computes the weighted sum of two arrays.
318
518
319
519
@param src1 First source array.
0 commit comments