Search in sources :

Example 1 with WaveletTransform

use of boofcv.abst.transform.wavelet.WaveletTransform in project BoofCV by lessthanoptimal.

the class FactoryImageDenoise method createDefaultShrinkTransform.

/**
 * Default wavelet transform used for denoising images.
 */
private static WaveletTransform createDefaultShrinkTransform(ImageDataType imageType, int numLevels, double minPixelValue, double maxPixelValue) {
    WaveletTransform descTran;
    if (!imageType.isInteger()) {
        WaveletDescription<WlCoef_F32> waveletDesc_F32 = FactoryWaveletDaub.daubJ_F32(4);
        descTran = FactoryWaveletTransform.create_F32(waveletDesc_F32, numLevels, (float) minPixelValue, (float) maxPixelValue);
    } else {
        WaveletDescription<WlCoef_I32> waveletDesc_I32 = FactoryWaveletDaub.biorthogonal_I32(5, BorderType.REFLECT);
        descTran = FactoryWaveletTransform.create_I(waveletDesc_I32, numLevels, (int) minPixelValue, (int) maxPixelValue, ImageType.getImageClass(ImageType.Family.GRAY, imageType));
    }
    return descTran;
}
Also used : WlCoef_F32(boofcv.struct.wavelet.WlCoef_F32) WlCoef_I32(boofcv.struct.wavelet.WlCoef_I32) FactoryWaveletTransform(boofcv.factory.transform.wavelet.FactoryWaveletTransform) WaveletTransform(boofcv.abst.transform.wavelet.WaveletTransform)

Example 2 with WaveletTransform

use of boofcv.abst.transform.wavelet.WaveletTransform in project BoofCV by lessthanoptimal.

the class FactoryImageDenoise method waveletVisu.

/**
 * Denoises an image using VISU Shrink wavelet denoiser.
 *
 * @param imageType The type of image being transform.
 * @param numLevels Number of levels in the wavelet transform.  If not sure, try using 3.
 * @param minPixelValue Minimum allowed pixel intensity value
 * @param maxPixelValue Maximum allowed pixel intensity value
 * @return filter for image noise removal.
 */
public static <T extends ImageGray<T>> WaveletDenoiseFilter<T> waveletVisu(Class<T> imageType, int numLevels, double minPixelValue, double maxPixelValue) {
    ImageDataType info = ImageDataType.classToType(imageType);
    WaveletTransform descTran = createDefaultShrinkTransform(info, numLevels, minPixelValue, maxPixelValue);
    DenoiseWavelet denoiser = FactoryDenoiseWaveletAlg.visu(imageType);
    return new WaveletDenoiseFilter<>(descTran, denoiser);
}
Also used : DenoiseWavelet(boofcv.alg.denoise.DenoiseWavelet) FactoryWaveletTransform(boofcv.factory.transform.wavelet.FactoryWaveletTransform) WaveletTransform(boofcv.abst.transform.wavelet.WaveletTransform) ImageDataType(boofcv.struct.image.ImageDataType)

Example 3 with WaveletTransform

use of boofcv.abst.transform.wavelet.WaveletTransform in project BoofCV by lessthanoptimal.

the class FactoryImageDenoise method waveletBayes.

/**
 * Denoises an image using BayesShrink wavelet denoiser.
 *
 * @param imageType The type of image being transform.
 * @param numLevels Number of levels in the wavelet transform.  If not sure, try using 3.
 * @param minPixelValue Minimum allowed pixel intensity value
 * @param maxPixelValue Maximum allowed pixel intensity value
 * @return filter for image noise removal.
 */
public static <T extends ImageGray<T>> WaveletDenoiseFilter<T> waveletBayes(Class<T> imageType, int numLevels, double minPixelValue, double maxPixelValue) {
    ImageDataType info = ImageDataType.classToType(imageType);
    WaveletTransform descTran = createDefaultShrinkTransform(info, numLevels, minPixelValue, maxPixelValue);
    DenoiseWavelet denoiser = FactoryDenoiseWaveletAlg.bayes(null, imageType);
    return new WaveletDenoiseFilter<>(descTran, denoiser);
}
Also used : DenoiseWavelet(boofcv.alg.denoise.DenoiseWavelet) FactoryWaveletTransform(boofcv.factory.transform.wavelet.FactoryWaveletTransform) WaveletTransform(boofcv.abst.transform.wavelet.WaveletTransform) ImageDataType(boofcv.struct.image.ImageDataType)

Example 4 with WaveletTransform

use of boofcv.abst.transform.wavelet.WaveletTransform in project BoofCV by lessthanoptimal.

the class FactoryImageDenoise method waveletSure.

/**
 * Denoises an image using SureShrink wavelet denoiser.
 *
 * @param imageType The type of image being transform.
 * @param numLevels Number of levels in the wavelet transform.  If not sure, try using 3.
 * @param minPixelValue Minimum allowed pixel intensity value
 * @param maxPixelValue Maximum allowed pixel intensity value
 * @return filter for image noise removal.
 */
public static <T extends ImageGray<T>> WaveletDenoiseFilter<T> waveletSure(Class<T> imageType, int numLevels, double minPixelValue, double maxPixelValue) {
    ImageDataType info = ImageDataType.classToType(imageType);
    WaveletTransform descTran = createDefaultShrinkTransform(info, numLevels, minPixelValue, maxPixelValue);
    DenoiseWavelet denoiser = FactoryDenoiseWaveletAlg.sure(imageType);
    return new WaveletDenoiseFilter<>(descTran, denoiser);
}
Also used : DenoiseWavelet(boofcv.alg.denoise.DenoiseWavelet) FactoryWaveletTransform(boofcv.factory.transform.wavelet.FactoryWaveletTransform) WaveletTransform(boofcv.abst.transform.wavelet.WaveletTransform) ImageDataType(boofcv.struct.image.ImageDataType)

Aggregations

WaveletTransform (boofcv.abst.transform.wavelet.WaveletTransform)4 FactoryWaveletTransform (boofcv.factory.transform.wavelet.FactoryWaveletTransform)4 DenoiseWavelet (boofcv.alg.denoise.DenoiseWavelet)3 ImageDataType (boofcv.struct.image.ImageDataType)3 WlCoef_F32 (boofcv.struct.wavelet.WlCoef_F32)1 WlCoef_I32 (boofcv.struct.wavelet.WlCoef_I32)1