Xphoto
Objective-C
@interface Xphoto : NSObject
Swift
class Xphoto : NSObject
The Xphoto module
Member classes: TonemapDurand, WhiteBalancer, SimpleWB, GrayworldWB, LearningBasedWB
Member enums: TransformTypes, Bm3dSteps, InpaintTypes
-
Creates an instance of GrayworldWB
Declaration
Objective-C
+ (nonnull GrayworldWB *)createGrayworldWB;Swift
class func createGrayworldWB() -> GrayworldWB -
Creates an instance of LearningBasedWB
Declaration
Objective-C
+ (nonnull LearningBasedWB *)createLearningBasedWB: (nonnull NSString *)path_to_model;Swift
class func createLearningBasedWB(path_to_model: String) -> LearningBasedWBParameters
path_to_modelPath to a .yml file with the model. If not specified, the default model is used
-
Creates an instance of LearningBasedWB
Declaration
Objective-C
+ (nonnull LearningBasedWB *)createLearningBasedWB;Swift
class func createLearningBasedWB() -> LearningBasedWB -
Creates TonemapDurand object
You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at your own risk.
Declaration
Objective-C
+ (nonnull TonemapDurand *)createTonemapDurand:(float)gamma contrast:(float)contrast saturation:(float)saturation sigma_color:(float)sigma_color sigma_space:(float)sigma_space;Swift
class func createTonemapDurand(gamma: Float, contrast: Float, saturation: Float, sigma_color: Float, sigma_space: Float) -> TonemapDurandParameters
gammagamma value for gamma correction. See createTonemap
contrastresulting contrast on logarithmic scale, i. e. log(max / min), where max and min are maximum and minimum luminance values of the resulting image.
saturationsaturation enhancement value. See createTonemapDrago
sigma_colorbilateral filter sigma in color space
sigma_spacebilateral filter sigma in coordinate space
-
Creates TonemapDurand object
You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at your own risk.
Declaration
Objective-C
+ (nonnull TonemapDurand *)createTonemapDurand:(float)gamma contrast:(float)contrast saturation:(float)saturation sigma_color:(float)sigma_color;Swift
class func createTonemapDurand(gamma: Float, contrast: Float, saturation: Float, sigma_color: Float) -> TonemapDurandParameters
gammagamma value for gamma correction. See createTonemap
contrastresulting contrast on logarithmic scale, i. e. log(max / min), where max and min are maximum and minimum luminance values of the resulting image.
saturationsaturation enhancement value. See createTonemapDrago
sigma_colorbilateral filter sigma in color space
-
Creates TonemapDurand object
You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at your own risk.
Declaration
Objective-C
+ (nonnull TonemapDurand *)createTonemapDurand:(float)gamma contrast:(float)contrast saturation:(float)saturation;Swift
class func createTonemapDurand(gamma: Float, contrast: Float, saturation: Float) -> TonemapDurandParameters
gammagamma value for gamma correction. See createTonemap
contrastresulting contrast on logarithmic scale, i. e. log(max / min), where max and min are maximum and minimum luminance values of the resulting image.
saturationsaturation enhancement value. See createTonemapDrago
-
Creates TonemapDurand object
You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at your own risk.
Declaration
Objective-C
+ (nonnull TonemapDurand *)createTonemapDurand:(float)gamma contrast:(float)contrast;Swift
class func createTonemapDurand(gamma: Float, contrast: Float) -> TonemapDurandParameters
gammagamma value for gamma correction. See createTonemap
contrastresulting contrast on logarithmic scale, i. e. log(max / min), where max and min are maximum and minimum luminance values of the resulting image.
-
Creates TonemapDurand object
You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at your own risk.
Declaration
Objective-C
+ (nonnull TonemapDurand *)createTonemapDurand:(float)gamma;Swift
class func createTonemapDurand(gamma: Float) -> TonemapDurandParameters
gammagamma value for gamma correction. See createTonemap are maximum and minimum luminance values of the resulting image.
-
Creates TonemapDurand object
You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at your own risk.
are maximum and minimum luminance values of the resulting image.
Declaration
Objective-C
+ (nonnull TonemapDurand *)createTonemapDurand;Swift
class func createTonemapDurand() -> TonemapDurand -
Implements an efficient fixed-point approximation for applying channel gains, which is the last step of multiple white balance algorithms.
Declaration
Parameters
srcInput three-channel image in the BGR color space (either CV_8UC3 or CV_16UC3)
dstOutput image of the same size and type as src.
gainBgain for the B channel
gainGgain for the G channel
gainRgain for the R channel
-
+bm3dDenoising:dst: 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.
Declaration
Objective-C
+ (void)bm3dDenoising:(nonnull Mat *)src dst:(nonnull Mat *)dst h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep beta:(float)beta normType:(int)normType step:(int)step transformType:(int)transformType;Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstOutput image with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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.
blockMatchingStep1Block 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.
blockMatchingStep2Block 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.
groupSizeMaximum size of the 3D group for collaborative filtering.
slidingStepSliding step to process every next reference block.
betaKaiser 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.
normTypeNorm used to calculate distance between blocks. L2 is slower than L1 but yields more accurate results.
stepStep 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.
transformTypeType 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. @sa fastNlMeansDenoising -
+bm3dDenoising:dst: 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.
Declaration
Objective-C
+ (void)bm3dDenoising:(nonnull Mat *)src dst:(nonnull Mat *)dst h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep beta:(float)beta normType:(int)normType step:(int)step;Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstOutput image with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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.
blockMatchingStep1Block 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.
blockMatchingStep2Block 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.
groupSizeMaximum size of the 3D group for collaborative filtering.
slidingStepSliding step to process every next reference block.
betaKaiser 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.
normTypeNorm used to calculate distance between blocks. L2 is slower than L1 but yields more accurate results.
stepStep 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. @sa fastNlMeansDenoising -
+bm3dDenoising:dst: 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.
Declaration
Objective-C
+ (void)bm3dDenoising:(nonnull Mat *)src dst:(nonnull Mat *)dst h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep beta:(float)beta normType:(int)normType;Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstOutput image with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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.
blockMatchingStep1Block 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.
blockMatchingStep2Block 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.
groupSizeMaximum size of the 3D group for collaborative filtering.
slidingStepSliding step to process every next reference block.
betaKaiser 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.
normTypeNorm 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. @sa fastNlMeansDenoising -
+bm3dDenoising:dst: 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.
Declaration
Objective-C
+ (void)bm3dDenoising:(nonnull Mat *)src dst:(nonnull Mat *)dst h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep beta:(float)beta;Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstOutput image with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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.
blockMatchingStep1Block 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.
blockMatchingStep2Block 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.
groupSizeMaximum size of the 3D group for collaborative filtering.
slidingStepSliding step to process every next reference block.
betaKaiser 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. @sa fastNlMeansDenoising -
+bm3dDenoising:dst: 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.
Declaration
Objective-C
+ (void)bm3dDenoising:(nonnull Mat *)src dst:(nonnull Mat *)dst h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep;Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstOutput image with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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.
blockMatchingStep1Block 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.
blockMatchingStep2Block 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.
groupSizeMaximum size of the 3D group for collaborative filtering.
slidingStepSliding 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. @sa fastNlMeansDenoising -
+bm3dDenoising:dst: 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.
Declaration
Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstOutput image with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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.
blockMatchingStep1Block 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.
blockMatchingStep2Block 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.
groupSizeMaximum 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. @sa fastNlMeansDenoising -
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.
Declaration
Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstOutput image with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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.
blockMatchingStep1Block 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.
blockMatchingStep2Block 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. @sa fastNlMeansDenoising -
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.
Declaration
Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstOutput image with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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.
blockMatchingStep1Block 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. @sa fastNlMeansDenoising -
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.
Declaration
Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstOutput image with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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. @sa fastNlMeansDenoising -
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.
Declaration
Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstOutput image with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize 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. @sa fastNlMeansDenoising -
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.
Declaration
Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstOutput image with the same size and type as src.
hParameter 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. @sa fastNlMeansDenoising -
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.
Declaration
Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstOutput 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. @sa fastNlMeansDenoising -
+bm3dDenoising:dstStep1: dstStep2: 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.
Declaration
Objective-C
+ (void)bm3dDenoising:(nonnull Mat *)src dstStep1:(nonnull Mat *)dstStep1 dstStep2:(nonnull Mat *)dstStep2 h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep beta:(float)beta normType:(int)normType step:(int)step transformType:(int)transformType;Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstStep1Output image of the first step of BM3D with the same size and type as src.
dstStep2Output image of the second step of BM3D with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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.
blockMatchingStep1Block 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.
blockMatchingStep2Block 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.
groupSizeMaximum size of the 3D group for collaborative filtering.
slidingStepSliding step to process every next reference block.
betaKaiser 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.
normTypeNorm used to calculate distance between blocks. L2 is slower than L1 but yields more accurate results.
stepStep of BM3D to be executed. Possible variants are: step 1, step 2, both steps.
transformTypeType 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. @sa fastNlMeansDenoising -
+bm3dDenoising:dstStep1: dstStep2: 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.
Declaration
Objective-C
+ (void)bm3dDenoising:(nonnull Mat *)src dstStep1:(nonnull Mat *)dstStep1 dstStep2:(nonnull Mat *)dstStep2 h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep beta:(float)beta normType:(int)normType step:(int)step;Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstStep1Output image of the first step of BM3D with the same size and type as src.
dstStep2Output image of the second step of BM3D with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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.
blockMatchingStep1Block 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.
blockMatchingStep2Block 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.
groupSizeMaximum size of the 3D group for collaborative filtering.
slidingStepSliding step to process every next reference block.
betaKaiser 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.
normTypeNorm used to calculate distance between blocks. L2 is slower than L1 but yields more accurate results.
stepStep 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. @sa fastNlMeansDenoising -
+bm3dDenoising:dstStep1: dstStep2: 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.
Declaration
Objective-C
+ (void)bm3dDenoising:(nonnull Mat *)src dstStep1:(nonnull Mat *)dstStep1 dstStep2:(nonnull Mat *)dstStep2 h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep beta:(float)beta normType:(int)normType;Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstStep1Output image of the first step of BM3D with the same size and type as src.
dstStep2Output image of the second step of BM3D with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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.
blockMatchingStep1Block 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.
blockMatchingStep2Block 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.
groupSizeMaximum size of the 3D group for collaborative filtering.
slidingStepSliding step to process every next reference block.
betaKaiser 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.
normTypeNorm 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. @sa fastNlMeansDenoising -
+bm3dDenoising:dstStep1: dstStep2: 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.
Declaration
Objective-C
+ (void)bm3dDenoising:(nonnull Mat *)src dstStep1:(nonnull Mat *)dstStep1 dstStep2:(nonnull Mat *)dstStep2 h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep beta:(float)beta;Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstStep1Output image of the first step of BM3D with the same size and type as src.
dstStep2Output image of the second step of BM3D with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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.
blockMatchingStep1Block 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.
blockMatchingStep2Block 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.
groupSizeMaximum size of the 3D group for collaborative filtering.
slidingStepSliding step to process every next reference block.
betaKaiser 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. @sa fastNlMeansDenoising -
+bm3dDenoising:dstStep1: dstStep2: 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.
Declaration
Objective-C
+ (void)bm3dDenoising:(nonnull Mat *)src dstStep1:(nonnull Mat *)dstStep1 dstStep2:(nonnull Mat *)dstStep2 h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep;Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstStep1Output image of the first step of BM3D with the same size and type as src.
dstStep2Output image of the second step of BM3D with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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.
blockMatchingStep1Block 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.
blockMatchingStep2Block 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.
groupSizeMaximum size of the 3D group for collaborative filtering.
slidingStepSliding 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. @sa fastNlMeansDenoising -
+bm3dDenoising:dstStep1: dstStep2: 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.
Declaration
Objective-C
+ (void)bm3dDenoising:(nonnull Mat *)src dstStep1:(nonnull Mat *)dstStep1 dstStep2:(nonnull Mat *)dstStep2 h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize;Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstStep1Output image of the first step of BM3D with the same size and type as src.
dstStep2Output image of the second step of BM3D with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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.
blockMatchingStep1Block 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.
blockMatchingStep2Block 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.
groupSizeMaximum 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. @sa fastNlMeansDenoising -
+bm3dDenoising:dstStep1: dstStep2: 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.
Declaration
Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstStep1Output image of the first step of BM3D with the same size and type as src.
dstStep2Output image of the second step of BM3D with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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.
blockMatchingStep1Block 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.
blockMatchingStep2Block 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. @sa fastNlMeansDenoising -
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.
Declaration
Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstStep1Output image of the first step of BM3D with the same size and type as src.
dstStep2Output image of the second step of BM3D with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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.
blockMatchingStep1Block 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. @sa fastNlMeansDenoising -
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.
Declaration
Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstStep1Output image of the first step of BM3D with the same size and type as src.
dstStep2Output image of the second step of BM3D with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize in pixels of the template patch that is used for block-matching. Should be power of 2.
searchWindowSizeSize 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. @sa fastNlMeansDenoising -
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.
Declaration
Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstStep1Output image of the first step of BM3D with the same size and type as src.
dstStep2Output image of the second step of BM3D with the same size and type as src.
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
templateWindowSizeSize 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. @sa fastNlMeansDenoising -
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.
Declaration
Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstStep1Output image of the first step of BM3D with the same size and type as src.
dstStep2Output image of the second step of BM3D with the same size and type as src.
hParameter 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. @sa fastNlMeansDenoising -
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.
Declaration
Parameters
srcInput 8-bit or 16-bit 1-channel image.
dstStep1Output image of the first step of BM3D with the same size and type as src.
dstStep2Output 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. @sa fastNlMeansDenoising -
The function implements simple dct-based denoising
<http://www.ipol.im/pub/art/2011/ys-dct/>.Declaration
Parameters
srcsource image
dstdestination image
sigmaexpected noise standard deviation
psizesize of block side where dct is computed
@sa fastNlMeansDenoising
-
The function implements simple dct-based denoising
<http://www.ipol.im/pub/art/2011/ys-dct/>.Declaration
Parameters
srcsource image
dstdestination image
sigmaexpected noise standard deviation
@sa fastNlMeansDenoising
-
The function implements different single-image inpainting algorithms.
See the original papers CITE: He2012 (Shiftmap) or CITE: GenserPCS2018 and CITE: SeilerTIP2015 (FSR) for details.Declaration
Parameters
srcsource image
- #INPAINT_SHIFTMAP: it could be of any type and any number of channels from 1 to 4. In case of 3- and 4-channels images the function expect them in CIELab colorspace or similar one, where first color component shows intensity, while second and third shows colors. Nonetheless you can try any colorspaces.
- #INPAINT_FSR_BEST or #INPAINT_FSR_FAST: 1-channel grayscale or 3-channel BGR image.
maskmask (#CV_8UC1), where non-zero pixels indicate valid image area, while zero pixels indicate area to be inpainted
dstdestination image
algorithmTypesee xphoto::InpaintTypes
-
oilPainting See the book CITE: Holzmann1988 for details.
Declaration
Parameters
srcInput three-channel or one channel image (either CV_8UC3 or CV_8UC1)
dstOutput image of the same size and type as src.
sizeneighbouring size is 2-size+1
dynRatioimage is divided by dynRatio before histogram processing
-
oilPainting See the book CITE: Holzmann1988 for details.
Declaration
Parameters
srcInput three-channel or one channel image (either CV_8UC3 or CV_8UC1)
dstOutput image of the same size and type as src.
sizeneighbouring size is 2-size+1
dynRatioimage is divided by dynRatio before histogram processing
View on GitHub
Xphoto Class Reference