public class opencv_xphoto extends opencv_xphoto
Modifier and Type | Field and Description |
---|---|
static int |
BM3D_STEP1
enum cv::xphoto::Bm3dSteps
|
static int |
BM3D_STEP2
enum cv::xphoto::Bm3dSteps
|
static int |
BM3D_STEPALL
enum cv::xphoto::Bm3dSteps
|
static int |
HAAR
enum cv::xphoto::TransformTypes
|
static int |
INPAINT_FSR_BEST
enum cv::xphoto::InpaintTypes
|
static int |
INPAINT_FSR_FAST
enum cv::xphoto::InpaintTypes
|
static int |
INPAINT_SHIFTMAP
enum cv::xphoto::InpaintTypes
|
Constructor and Description |
---|
opencv_xphoto() |
Modifier and Type | Method and Description |
---|---|
static void |
applyChannelGains(GpuMat src,
GpuMat dst,
float gainB,
float gainG,
float gainR) |
static void |
applyChannelGains(Mat src,
Mat dst,
float gainB,
float gainG,
float gainR)
\brief Implements an efficient fixed-point approximation for applying channel gains, which is
the last step of multiple white balance algorithms.
|
static void |
applyChannelGains(UMat src,
UMat dst,
float gainB,
float gainG,
float gainR) |
static void |
bm3dDenoising(GpuMat src,
GpuMat dst) |
static void |
bm3dDenoising(GpuMat src,
GpuMat dst,
float h,
int templateWindowSize,
int searchWindowSize,
int blockMatchingStep1,
int blockMatchingStep2,
int groupSize,
int slidingStep,
float beta,
int normType,
int step,
int transformType) |
static void |
bm3dDenoising(GpuMat src,
GpuMat dstStep1,
GpuMat dstStep2) |
static void |
bm3dDenoising(GpuMat src,
GpuMat dstStep1,
GpuMat dstStep2,
float h,
int templateWindowSize,
int searchWindowSize,
int blockMatchingStep1,
int blockMatchingStep2,
int groupSize,
int slidingStep,
float beta,
int normType,
int step,
int transformType) |
static void |
bm3dDenoising(Mat src,
Mat dst) |
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)
\brief Performs image denoising using the Block-Matching and 3D-filtering algorithm
|
static void |
bm3dDenoising(Mat src,
Mat dstStep1,
Mat dstStep2) |
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)
\brief Performs image denoising using the Block-Matching and 3D-filtering algorithm
|
static void |
bm3dDenoising(UMat src,
UMat dst) |
static void |
bm3dDenoising(UMat src,
UMat dst,
float h,
int templateWindowSize,
int searchWindowSize,
int blockMatchingStep1,
int blockMatchingStep2,
int groupSize,
int slidingStep,
float beta,
int normType,
int step,
int transformType) |
static void |
bm3dDenoising(UMat src,
UMat dstStep1,
UMat dstStep2) |
static void |
bm3dDenoising(UMat src,
UMat dstStep1,
UMat dstStep2,
float h,
int templateWindowSize,
int searchWindowSize,
int blockMatchingStep1,
int blockMatchingStep2,
int groupSize,
int slidingStep,
float beta,
int normType,
int step,
int transformType) |
static GrayworldWB |
createGrayworldWB()
\brief Creates an instance of GrayworldWB
|
static LearningBasedWB |
createLearningBasedWB() |
static LearningBasedWB |
createLearningBasedWB(BytePointer path_to_model)
\brief Creates an instance of LearningBasedWB
|
static LearningBasedWB |
createLearningBasedWB(String path_to_model) |
static SimpleWB |
createSimpleWB()
\brief Creates an instance of SimpleWB
|
static TonemapDurand |
createTonemapDurand() |
static TonemapDurand |
createTonemapDurand(float gamma,
float contrast,
float saturation,
float sigma_color,
float sigma_space)
\brief Creates TonemapDurand object
|
static void |
dctDenoising(Mat src,
Mat dst,
double sigma) |
static void |
dctDenoising(Mat src,
Mat dst,
double sigma,
int psize)
\addtogroup xphoto
\{
|
static void |
inpaint(Mat src,
Mat mask,
Mat dst,
int algorithmType)
\brief The function implements different single-image inpainting algorithms.
|
static void |
oilPainting(GpuMat src,
GpuMat dst,
int size,
int dynRatio) |
static void |
oilPainting(GpuMat src,
GpuMat dst,
int size,
int dynRatio,
int code) |
static void |
oilPainting(Mat src,
Mat dst,
int size,
int dynRatio)
\brief oilPainting
See the book \cite Holzmann1988 for details.
|
static void |
oilPainting(Mat src,
Mat dst,
int size,
int dynRatio,
int code)
\addtogroup xphoto
\{
|
static void |
oilPainting(UMat src,
UMat dst,
int size,
int dynRatio) |
static void |
oilPainting(UMat src,
UMat dst,
int size,
int dynRatio,
int code) |
map
public static final int INPAINT_SHIFTMAP
public static final int INPAINT_FSR_BEST
public static final int INPAINT_FSR_FAST
public static final int HAAR
public static final int BM3D_STEPALL
public static final int BM3D_STEP1
public static final int BM3D_STEP2
@Namespace(value="cv::xphoto") public static void inpaint(@Const @ByRef Mat src, @Const @ByRef Mat mask, @ByRef Mat dst, int algorithmType)
See the original papers \cite He2012 (Shiftmap) or \cite GenserPCS2018 and \cite SeilerTIP2015 (FSR) for details.
src
- source 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.mask
- mask (#CV_8UC1), where non-zero pixels indicate valid image area, while zero pixels
indicate area to be inpainteddst
- destination imagealgorithmType
- see xphoto::InpaintTypes@Namespace(value="cv::xphoto") @opencv_core.Ptr public static SimpleWB createSimpleWB()
@Namespace(value="cv::xphoto") @opencv_core.Ptr public static GrayworldWB createGrayworldWB()
@Namespace(value="cv::xphoto") @opencv_core.Ptr public static LearningBasedWB createLearningBasedWB(@opencv_core.Str BytePointer path_to_model)
path_to_model
- Path to a .yml file with the model. If not specified, the default model is used@Namespace(value="cv::xphoto") @opencv_core.Ptr public static LearningBasedWB createLearningBasedWB()
@Namespace(value="cv::xphoto") @opencv_core.Ptr public static LearningBasedWB createLearningBasedWB(@opencv_core.Str String path_to_model)
@Namespace(value="cv::xphoto") public static void applyChannelGains(@ByVal Mat src, @ByVal Mat dst, float gainB, float gainG, float gainR)
src
- Input three-channel image in the BGR color space (either CV_8UC3 or CV_16UC3)dst
- Output image of the same size and type as src.gainB
- gain for the B channelgainG
- gain for the G channelgainR
- gain for the R channel@Namespace(value="cv::xphoto") public static void applyChannelGains(@ByVal UMat src, @ByVal UMat dst, float gainB, float gainG, float gainR)
@Namespace(value="cv::xphoto") public static void applyChannelGains(@ByVal GpuMat src, @ByVal GpuMat dst, float gainB, float gainG, float gainR)
@Namespace(value="cv::xphoto") public static void dctDenoising(@Const @ByRef Mat src, @ByRef Mat dst, double sigma, int psize)
/** \brief The function implements simple dct-based denoising
src
- source imagedst
- destination imagesigma
- expected noise standard deviationpsize
- size of block side where dct is computed
fastNlMeansDenoising
@Namespace(value="cv::xphoto") public static void dctDenoising(@Const @ByRef Mat src, @ByRef Mat dst, double sigma)
@Namespace(value="cv::xphoto") public static void bm3dDenoising(@ByVal Mat src, @ByVal Mat dstStep1, @ByVal Mat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step, int transformType)
src
- Input 8-bit or 16-bit 1-channel image.dstStep1
- Output image of the first step of BM3D with the same size and type as src.dstStep2
- Output image of the second step of BM3D with the same size and type as src.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.templateWindowSize
- Size in pixels of the template patch that is used for block-matching.
Should be power of 2.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.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.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.groupSize
- Maximum size of the 3D group for collaborative filtering.slidingStep
- Sliding step to process every next reference block.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.normType
- Norm used to calculate distance between blocks. L2 is slower than L1
but yields more accurate results.step
- Step of BM3D to be executed. Possible variants are: step 1, step 2, both steps.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.
fastNlMeansDenoising
@Namespace(value="cv::xphoto") public static void bm3dDenoising(@ByVal Mat src, @ByVal Mat dstStep1, @ByVal Mat dstStep2)
@Namespace(value="cv::xphoto") public static void bm3dDenoising(@ByVal UMat src, @ByVal UMat dstStep1, @ByVal UMat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step, int transformType)
@Namespace(value="cv::xphoto") public static void bm3dDenoising(@ByVal UMat src, @ByVal UMat dstStep1, @ByVal UMat dstStep2)
@Namespace(value="cv::xphoto") public static void bm3dDenoising(@ByVal GpuMat src, @ByVal GpuMat dstStep1, @ByVal GpuMat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step, int transformType)
@Namespace(value="cv::xphoto") public static void bm3dDenoising(@ByVal GpuMat src, @ByVal GpuMat dstStep1, @ByVal GpuMat dstStep2)
@Namespace(value="cv::xphoto") public static void bm3dDenoising(@ByVal Mat src, @ByVal Mat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step, int transformType)
src
- Input 8-bit or 16-bit 1-channel image.dst
- Output image with the same size and type as src.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.templateWindowSize
- Size in pixels of the template patch that is used for block-matching.
Should be power of 2.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.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.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.groupSize
- Maximum size of the 3D group for collaborative filtering.slidingStep
- Sliding step to process every next reference block.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.normType
- Norm used to calculate distance between blocks. L2 is slower than L1
but yields more accurate results.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.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.
fastNlMeansDenoising
@Namespace(value="cv::xphoto") public static void bm3dDenoising(@ByVal Mat src, @ByVal Mat dst)
@Namespace(value="cv::xphoto") public static void bm3dDenoising(@ByVal UMat src, @ByVal UMat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step, int transformType)
@Namespace(value="cv::xphoto") public static void bm3dDenoising(@ByVal UMat src, @ByVal UMat dst)
@Namespace(value="cv::xphoto") public static void bm3dDenoising(@ByVal GpuMat src, @ByVal GpuMat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step, int transformType)
@Namespace(value="cv::xphoto") public static void bm3dDenoising(@ByVal GpuMat src, @ByVal GpuMat dst)
@Namespace(value="cv::xphoto") public static void oilPainting(@ByVal Mat src, @ByVal Mat dst, int size, int dynRatio, int code)
/** \brief oilPainting See the book \cite Holzmann1988 for details.
src
- Input three-channel or one channel image (either CV_8UC3 or CV_8UC1)dst
- Output image of the same size and type as src.size
- neighbouring size is 2-size+1dynRatio
- image is divided by dynRatio before histogram processingcode
- color space conversion code(see ColorConversionCodes). Histogram will used only first plane@Namespace(value="cv::xphoto") public static void oilPainting(@ByVal UMat src, @ByVal UMat dst, int size, int dynRatio, int code)
@Namespace(value="cv::xphoto") public static void oilPainting(@ByVal GpuMat src, @ByVal GpuMat dst, int size, int dynRatio, int code)
@Namespace(value="cv::xphoto") public static void oilPainting(@ByVal Mat src, @ByVal Mat dst, int size, int dynRatio)
src
- Input three-channel or one channel image (either CV_8UC3 or CV_8UC1)dst
- Output image of the same size and type as src.size
- neighbouring size is 2-size+1dynRatio
- image is divided by dynRatio before histogram processing@Namespace(value="cv::xphoto") public static void oilPainting(@ByVal UMat src, @ByVal UMat dst, int size, int dynRatio)
@Namespace(value="cv::xphoto") public static void oilPainting(@ByVal GpuMat src, @ByVal GpuMat dst, int size, int dynRatio)
@Namespace(value="cv::xphoto") @opencv_core.Ptr public static TonemapDurand createTonemapDurand(float gamma, float contrast, float saturation, float sigma_color, float sigma_space)
You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at your own risk.
gamma
- gamma value for gamma correction. See createTonemapcontrast
- resulting contrast on logarithmic scale, i. e. log(max / min), where max and min
are maximum and minimum luminance values of the resulting image.saturation
- saturation enhancement value. See createTonemapDragosigma_color
- bilateral filter sigma in color spacesigma_space
- bilateral filter sigma in coordinate space@Namespace(value="cv::xphoto") @opencv_core.Ptr public static TonemapDurand createTonemapDurand()
Copyright © 2020. All rights reserved.