using OpenCVForUnity.CoreModule; using OpenCVForUnity.UtilsModule; using System; using System.Collections.Generic; using System.Runtime.InteropServices; namespace OpenCVForUnity.XphotoModule { // C++: class Xphoto public class Xphoto { // C++: enum cv.xphoto.Bm3dSteps public const int BM3D_STEPALL = 0; public const int BM3D_STEP1 = 1; public const int BM3D_STEP2 = 2; // C++: enum cv.xphoto.InpaintTypes public const int INPAINT_SHIFTMAP = 0; public const int INPAINT_FSR_BEST = 1; public const int INPAINT_FSR_FAST = 2; // C++: enum cv.xphoto.TransformTypes public const int HAAR = 0; // // C++: void cv::xphoto::bm3dDenoising(Mat src, Mat& dstStep1, Mat& dstStep2, float h = 1, int templateWindowSize = 4, int searchWindowSize = 16, int blockMatchingStep1 = 2500, int blockMatchingStep2 = 400, int groupSize = 8, int slidingStep = 1, float beta = 2.0f, int normType = cv::NORM_L2, int step = cv::xphoto::BM3D_STEPALL, int transformType = cv::xphoto::HAAR) // /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dstStep1 Output image of the first step of BM3D with the same size and type as src. * param dstStep2 Output image of the second step of BM3D with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param groupSize Maximum size of the 3D group for collaborative filtering. * param slidingStep Sliding step to process every next reference block. * param beta Kaiser window parameter that affects the sidelobe attenuation of the transform of the * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * param normType Norm used to calculate distance between blocks. L2 is slower than L1 * but yields more accurate results. * param step Step of BM3D to be executed. Possible variants are: step 1, step 2, both steps. * param transformType Type of the orthogonal transform used in collaborative filtering step. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step, int transformType) { if (src != null) src.ThrowIfDisposed(); if (dstStep1 != null) dstStep1.ThrowIfDisposed(); if (dstStep2 != null) dstStep2.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_10(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType, step, transformType); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dstStep1 Output image of the first step of BM3D with the same size and type as src. * param dstStep2 Output image of the second step of BM3D with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param groupSize Maximum size of the 3D group for collaborative filtering. * param slidingStep Sliding step to process every next reference block. * param beta Kaiser window parameter that affects the sidelobe attenuation of the transform of the * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * param normType Norm used to calculate distance between blocks. L2 is slower than L1 * but yields more accurate results. * param step Step of BM3D to be executed. Possible variants are: step 1, step 2, both steps. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step) { if (src != null) src.ThrowIfDisposed(); if (dstStep1 != null) dstStep1.ThrowIfDisposed(); if (dstStep2 != null) dstStep2.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_11(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType, step); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dstStep1 Output image of the first step of BM3D with the same size and type as src. * param dstStep2 Output image of the second step of BM3D with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param groupSize Maximum size of the 3D group for collaborative filtering. * param slidingStep Sliding step to process every next reference block. * param beta Kaiser window parameter that affects the sidelobe attenuation of the transform of the * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * param normType Norm used to calculate distance between blocks. L2 is slower than L1 * but yields more accurate results. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType) { if (src != null) src.ThrowIfDisposed(); if (dstStep1 != null) dstStep1.ThrowIfDisposed(); if (dstStep2 != null) dstStep2.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_12(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dstStep1 Output image of the first step of BM3D with the same size and type as src. * param dstStep2 Output image of the second step of BM3D with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param groupSize Maximum size of the 3D group for collaborative filtering. * param slidingStep Sliding step to process every next reference block. * param beta Kaiser window parameter that affects the sidelobe attenuation of the transform of the * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta) { if (src != null) src.ThrowIfDisposed(); if (dstStep1 != null) dstStep1.ThrowIfDisposed(); if (dstStep2 != null) dstStep2.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_13(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dstStep1 Output image of the first step of BM3D with the same size and type as src. * param dstStep2 Output image of the second step of BM3D with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param groupSize Maximum size of the 3D group for collaborative filtering. * param slidingStep Sliding step to process every next reference block. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep) { if (src != null) src.ThrowIfDisposed(); if (dstStep1 != null) dstStep1.ThrowIfDisposed(); if (dstStep2 != null) dstStep2.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_14(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dstStep1 Output image of the first step of BM3D with the same size and type as src. * param dstStep2 Output image of the second step of BM3D with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param groupSize Maximum size of the 3D group for collaborative filtering. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize) { if (src != null) src.ThrowIfDisposed(); if (dstStep1 != null) dstStep1.ThrowIfDisposed(); if (dstStep2 != null) dstStep2.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_15(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dstStep1 Output image of the first step of BM3D with the same size and type as src. * param dstStep2 Output image of the second step of BM3D with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2) { if (src != null) src.ThrowIfDisposed(); if (dstStep1 != null) dstStep1.ThrowIfDisposed(); if (dstStep2 != null) dstStep2.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_16(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dstStep1 Output image of the first step of BM3D with the same size and type as src. * param dstStep2 Output image of the second step of BM3D with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1) { if (src != null) src.ThrowIfDisposed(); if (dstStep1 != null) dstStep1.ThrowIfDisposed(); if (dstStep2 != null) dstStep2.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_17(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dstStep1 Output image of the first step of BM3D with the same size and type as src. * param dstStep2 Output image of the second step of BM3D with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize) { if (src != null) src.ThrowIfDisposed(); if (dstStep1 != null) dstStep1.ThrowIfDisposed(); if (dstStep2 != null) dstStep2.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_18(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dstStep1 Output image of the first step of BM3D with the same size and type as src. * param dstStep2 Output image of the second step of BM3D with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize) { if (src != null) src.ThrowIfDisposed(); if (dstStep1 != null) dstStep1.ThrowIfDisposed(); if (dstStep2 != null) dstStep2.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_19(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dstStep1 Output image of the first step of BM3D with the same size and type as src. * param dstStep2 Output image of the second step of BM3D with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * Should be power of 2. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dstStep1, Mat dstStep2, float h) { if (src != null) src.ThrowIfDisposed(); if (dstStep1 != null) dstStep1.ThrowIfDisposed(); if (dstStep2 != null) dstStep2.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_110(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dstStep1 Output image of the first step of BM3D with the same size and type as src. * param dstStep2 Output image of the second step of BM3D with the same size and type as src. * removes image details, smaller h value preserves details but also preserves some noise. * Should be power of 2. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dstStep1, Mat dstStep2) { if (src != null) src.ThrowIfDisposed(); if (dstStep1 != null) dstStep1.ThrowIfDisposed(); if (dstStep2 != null) dstStep2.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_111(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj); } // // C++: void cv::xphoto::bm3dDenoising(Mat src, Mat& dst, float h = 1, int templateWindowSize = 4, int searchWindowSize = 16, int blockMatchingStep1 = 2500, int blockMatchingStep2 = 400, int groupSize = 8, int slidingStep = 1, float beta = 2.0f, int normType = cv::NORM_L2, int step = cv::xphoto::BM3D_STEPALL, int transformType = cv::xphoto::HAAR) // /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dst Output image with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param groupSize Maximum size of the 3D group for collaborative filtering. * param slidingStep Sliding step to process every next reference block. * param beta Kaiser window parameter that affects the sidelobe attenuation of the transform of the * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * param normType Norm used to calculate distance between blocks. L2 is slower than L1 * but yields more accurate results. * param step Step of BM3D to be executed. Allowed are only BM3D_STEP1 and BM3D_STEPALL. * BM3D_STEP2 is not allowed as it requires basic estimate to be present. * param transformType Type of the orthogonal transform used in collaborative filtering step. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step, int transformType) { if (src != null) src.ThrowIfDisposed(); if (dst != null) dst.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_112(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType, step, transformType); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dst Output image with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param groupSize Maximum size of the 3D group for collaborative filtering. * param slidingStep Sliding step to process every next reference block. * param beta Kaiser window parameter that affects the sidelobe attenuation of the transform of the * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * param normType Norm used to calculate distance between blocks. L2 is slower than L1 * but yields more accurate results. * param step Step of BM3D to be executed. Allowed are only BM3D_STEP1 and BM3D_STEPALL. * BM3D_STEP2 is not allowed as it requires basic estimate to be present. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step) { if (src != null) src.ThrowIfDisposed(); if (dst != null) dst.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_113(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType, step); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dst Output image with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param groupSize Maximum size of the 3D group for collaborative filtering. * param slidingStep Sliding step to process every next reference block. * param beta Kaiser window parameter that affects the sidelobe attenuation of the transform of the * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * param normType Norm used to calculate distance between blocks. L2 is slower than L1 * but yields more accurate results. * BM3D_STEP2 is not allowed as it requires basic estimate to be present. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType) { if (src != null) src.ThrowIfDisposed(); if (dst != null) dst.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_114(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dst Output image with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param groupSize Maximum size of the 3D group for collaborative filtering. * param slidingStep Sliding step to process every next reference block. * param beta Kaiser window parameter that affects the sidelobe attenuation of the transform of the * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * BM3D_STEP2 is not allowed as it requires basic estimate to be present. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta) { if (src != null) src.ThrowIfDisposed(); if (dst != null) dst.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_115(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dst Output image with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param groupSize Maximum size of the 3D group for collaborative filtering. * param slidingStep Sliding step to process every next reference block. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * BM3D_STEP2 is not allowed as it requires basic estimate to be present. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep) { if (src != null) src.ThrowIfDisposed(); if (dst != null) dst.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_116(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dst Output image with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param groupSize Maximum size of the 3D group for collaborative filtering. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * BM3D_STEP2 is not allowed as it requires basic estimate to be present. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize) { if (src != null) src.ThrowIfDisposed(); if (dst != null) dst.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_117(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dst Output image with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * BM3D_STEP2 is not allowed as it requires basic estimate to be present. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2) { if (src != null) src.ThrowIfDisposed(); if (dst != null) dst.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_118(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dst Output image with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding), * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * BM3D_STEP2 is not allowed as it requires basic estimate to be present. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1) { if (src != null) src.ThrowIfDisposed(); if (dst != null) dst.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_119(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dst Output image with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * param searchWindowSize Size in pixels of the window that is used to perform block-matching. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * BM3D_STEP2 is not allowed as it requires basic estimate to be present. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize) { if (src != null) src.ThrowIfDisposed(); if (dst != null) dst.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_120(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dst Output image with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * param templateWindowSize Size in pixels of the template patch that is used for block-matching. * Should be power of 2. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * BM3D_STEP2 is not allowed as it requires basic estimate to be present. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dst, float h, int templateWindowSize) { if (src != null) src.ThrowIfDisposed(); if (dst != null) dst.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_121(src.nativeObj, dst.nativeObj, h, templateWindowSize); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dst Output image with the same size and type as src. * param h Parameter regulating filter strength. Big h value perfectly removes noise but also * removes image details, smaller h value preserves details but also preserves some noise. * Should be power of 2. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * BM3D_STEP2 is not allowed as it requires basic estimate to be present. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dst, float h) { if (src != null) src.ThrowIfDisposed(); if (dst != null) dst.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_122(src.nativeObj, dst.nativeObj, h); } /** * Performs image denoising using the Block-Matching and 3D-filtering algorithm * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational * optimizations. Noise expected to be a gaussian white noise. * * param src Input 8-bit or 16-bit 1-channel image. * param dst Output image with the same size and type as src. * removes image details, smaller h value preserves details but also preserves some noise. * Should be power of 2. * Affect performance linearly: greater searchWindowsSize - greater denoising time. * Must be larger than templateWindowSize. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * i.e. maximum distance for which two blocks are considered similar. * Value expressed in euclidean distance. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, * set beta to zero. * but yields more accurate results. * BM3D_STEP2 is not allowed as it requires basic estimate to be present. * Currently only Haar transform is supported. * * This function expected to be applied to grayscale images. Advanced usage of this function * can be manual denoising of colored image in different colorspaces. * * SEE: * fastNlMeansDenoising */ public static void bm3dDenoising(Mat src, Mat dst) { if (src != null) src.ThrowIfDisposed(); if (dst != null) dst.ThrowIfDisposed(); xphoto_Xphoto_bm3dDenoising_123(src.nativeObj, dst.nativeObj); } // // C++: void cv::xphoto::dctDenoising(Mat src, Mat dst, double sigma, int psize = 16) // /** * The function implements simple dct-based denoising * * <http://www.ipol.im/pub/art/2011/ys-dct/>. * param src source image * param dst destination image * param sigma expected noise standard deviation * param psize size of block side where dct is computed * * SEE: * fastNlMeansDenoising */ public static void dctDenoising(Mat src, Mat dst, double sigma, int psize) { if (src != null) src.ThrowIfDisposed(); if (dst != null) dst.ThrowIfDisposed(); xphoto_Xphoto_dctDenoising_10(src.nativeObj, dst.nativeObj, sigma, psize); } /** * The function implements simple dct-based denoising * * <http://www.ipol.im/pub/art/2011/ys-dct/>. * param src source image * param dst destination image * param sigma expected noise standard deviation * * SEE: * fastNlMeansDenoising */ public static void dctDenoising(Mat src, Mat dst, double sigma) { if (src != null) src.ThrowIfDisposed(); if (dst != null) dst.ThrowIfDisposed(); xphoto_Xphoto_dctDenoising_11(src.nativeObj, dst.nativeObj, sigma); } // // C++: void cv::xphoto::inpaint(Mat src, Mat mask, Mat dst, int algorithmType) // /** * The function implements different single-image inpainting algorithms. * * See the original papers CITE: He2012 (Shiftmap) or CITE: GenserPCS2018 and CITE: SeilerTIP2015 (FSR) for details. * * param src source image *