@@ -375,6 +375,71 @@ void rollingGuidanceFilter(InputArray src, OutputArray dst, int d = -1, double s
375
375
// ////////////////////////////////////////////////////////////////////////
376
376
// ////////////////////////////////////////////////////////////////////////
377
377
378
+ /* * @brief Interface for implementations of The Fast Bilateral Solver.
379
+
380
+ For more details about this solver see @cite BarronPoole2016 .
381
+ */
382
+ class CV_EXPORTS_W FastBilateralSolverFilter : public Algorithm
383
+ {
384
+ public:
385
+ /* * @brief Apply smoothing operation to the source image.
386
+
387
+ @param src source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 3 channels.
388
+
389
+ @param confidence confidence image with unsigned 8-bit or floating-point 32-bit confidence and 1 channel.
390
+
391
+ @param dst destination image.
392
+ */
393
+ CV_WRAP virtual void filter (InputArray src, InputArray confidence, OutputArray dst) = 0;
394
+ };
395
+
396
+ /* * @brief Factory method, create instance of FastBilateralSolverFilter and execute the initialization routines.
397
+
398
+ @param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
399
+
400
+ @param sigma_spatial parameter, that is similar to spatial space sigma in bilateralFilter.
401
+
402
+ @param sigma_luma parameter, that is similar to luma space sigma in bilateralFilter.
403
+
404
+ @param sigma_chroma parameter, that is similar to chroma space sigma in bilateralFilter.
405
+
406
+ @param num_iter number of iterations used for solving, 25 is usually enough.
407
+
408
+ @param max_tol solving tolerance used for solving.
409
+
410
+ For more details about the Fast Bilateral Solver parameters, see the original paper @cite BarronPoole2016.
411
+
412
+ */
413
+ CV_EXPORTS_W Ptr <FastBilateralSolverFilter> createFastBilateralSolverFilter (InputArray guide, double sigma_spatial, double sigma_luma, double sigma_chroma, int num_iter = 25 , double max_tol = 1e-5 );
414
+
415
+ /* * @brief Simple one-line Fast Bilateral Solver filter call. If you have multiple images to filter with the same
416
+ guide then use FastBilateralSolverFilter interface to avoid extra computations.
417
+
418
+ @param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
419
+
420
+ @param src source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.
421
+
422
+ @param confidence confidence image with unsigned 8-bit or floating-point 32-bit confidence and 1 channel.
423
+
424
+ @param dst destination image.
425
+
426
+ @param sigma_spatial parameter, that is similar to spatial space sigma in bilateralFilter.
427
+
428
+ @param sigma_luma parameter, that is similar to luma space sigma in bilateralFilter.
429
+
430
+ @param sigma_chroma parameter, that is similar to chroma space sigma in bilateralFilter.
431
+
432
+ @param num_iter number of iterations used for solving, 25 is usually enough.
433
+
434
+ @param max_tol solving tolerance used for solving.
435
+
436
+ @note Confidence images with CV_8U depth are expected to in [0, 255] and CV_32F in [0, 1] range.
437
+ */
438
+ CV_EXPORTS_W void fastBilateralSolverFilter (InputArray guide, InputArray src, InputArray confidence, OutputArray dst, double sigma_spatial = 8 , double sigma_luma = 8 , double sigma_chroma = 8 , int num_iter = 25 , double max_tol = 1e-5 );
439
+
440
+ // ////////////////////////////////////////////////////////////////////////
441
+ // ////////////////////////////////////////////////////////////////////////
442
+
378
443
379
444
/* * @brief Interface for implementations of Fast Global Smoother filter.
380
445
0 commit comments