本文整理汇总了Java中boofcv.abst.denoise.FactoryImageDenoise类的典型用法代码示例。如果您正苦于以下问题:Java FactoryImageDenoise类的具体用法?Java FactoryImageDenoise怎么用?Java FactoryImageDenoise使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FactoryImageDenoise类属于boofcv.abst.denoise包,在下文中一共展示了FactoryImageDenoise类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import boofcv.abst.denoise.FactoryImageDenoise; //导入依赖的package包/类
@Override
public void init(RunConfig config) throws InvalidTestFormatException {
super.init(config);
File file = new File(GR.getGoldenDir(), goldenFileName);
try {
rnd = new Random(repeats);
InputStream inImageStream = MTTestResourceManager.openFileAsInputStream(file.getPath());
ImageUInt8 inImage = UtilImageIO.loadPGM_U8(inImageStream, (ImageUInt8) null);
ImageFloat32 convImage = ConvertImage.convert(inImage,
(ImageFloat32) null);
levels = 4;
denoiser = FactoryImageDenoise.waveletBayes(ImageFloat32.class,
levels, 0, 255);
noisy = convImage.clone();
denoisy = convImage.clone();
} catch (IOException e) {
throw new GoldenFileNotFoundException(file, this.getClass());
}
}
示例2: init
import boofcv.abst.denoise.FactoryImageDenoise; //导入依赖的package包/类
@Override
public void init(RunConfig config) throws InvalidTestFormatException {
super.init(config);
File file = new File(GR.getGoldenDir(), goldenFileName);
try {
rnd = new Random(repeats);
InputStream inImageStream = MTTestResourceManager.openFileAsInputStream(file.getPath());
ImageUInt8 inImage = UtilImageIO.loadPGM_U8(inImageStream, (ImageUInt8) null);
ImageFloat32 convImage = ConvertImage.convert(inImage, (ImageFloat32) null);
levels = 4;
denoiser = FactoryImageDenoise.waveletSure(ImageFloat32.class, levels, 0, 255);
noisy = convImage.clone();
denoisy = convImage.clone();
} catch (IOException e) {
throw new GoldenFileNotFoundException(file, this.getClass());
}
}
示例3: init
import boofcv.abst.denoise.FactoryImageDenoise; //导入依赖的package包/类
@Override
public void init(RunConfig config) throws InvalidTestFormatException {
super.init(config);
File file = new File(GR.getGoldenDir(), goldenFileName);
try {
rnd = new Random(repeats);
InputStream inImageStream = MTTestResourceManager.openFileAsInputStream(file.getPath());
ImageUInt8 inImage = UtilImageIO.loadPGM_U8(inImageStream, (ImageUInt8) null);
ImageFloat32 convImage = ConvertImage.convert(inImage,
(ImageFloat32) null);
levels = 4;
denoiser = FactoryImageDenoise.waveletVisu(ImageFloat32.class,
levels, 0, 255);
noisy = convImage.clone();
denoisy = convImage.clone();
} catch (IOException e) {
throw new GoldenFileNotFoundException(file, this.getClass());
}
}
示例4: main
import boofcv.abst.denoise.FactoryImageDenoise; //导入依赖的package包/类
public static void main( String args[] ) {
// load the input image, declare data structures, create a noisy image
Random rand = new Random(234);
String dir = new File(".").getAbsolutePath();
File file = new File("/Users/mehdibenchoufi/Downloads/Example_lena_denoise_noisy.jpg");
ImageFloat32 input = UtilImageIO.loadImage(file.getAbsolutePath(), ImageFloat32.class);
ImageFloat32 noisy = input.clone();
GImageMiscOps.addGaussian(noisy, rand, 20, 0, 255);
ImageFloat32 denoised = new ImageFloat32(input.width, input.height);
// How many levels in wavelet transform
int numLevels = 4;
// Create the noise removal algorithm
WaveletDenoiseFilter<ImageFloat32> denoiser =
FactoryImageDenoise.waveletBayes(ImageFloat32.class, numLevels, 0, 255);
// remove noise from the image
denoiser.process(noisy,denoised);
// display the results
ListDisplayPanel gui = new ListDisplayPanel();
gui.addImage(ConvertBufferedImage.convertTo(input, null),"Input");
gui.addImage(ConvertBufferedImage.convertTo(noisy,null),"Noisy");
gui.addImage(ConvertBufferedImage.convertTo(denoised,null),"Denoised");
ShowImages.showWindow(input, "With noise", true);
ShowImages.showWindow(denoised, "Without noise", true);
}
示例5: denoising
import boofcv.abst.denoise.FactoryImageDenoise; //导入依赖的package包/类
private void denoising() {
Random rand = new Random(234);
ImageFloat32 input = imageFloat32.clone();
GImageMiscOps.addGaussian(input, rand, 20, 0, 255);
ImageFloat32 denoised = new ImageFloat32(input.width, input.height);
// Levels in wavelet transform
int numLevels = 4;
// Noise removal algorithm
WaveletDenoiseFilter<ImageFloat32> denoiser =
FactoryImageDenoise.waveletBayes(ImageFloat32.class, numLevels, 0, 255);
// remove noise from the image
denoiser.process(input, denoised);
imageBase.setImage(denoised);
}
示例6: main
import boofcv.abst.denoise.FactoryImageDenoise; //导入依赖的package包/类
public static void main( String args[] ) {
// load the input image, declare data structures, create a noisy image
Random rand = new Random(234);
ImageFloat32 input = UtilImageIO.loadImage("../data/evaluation/standard/lena512.bmp",ImageFloat32.class);
ImageFloat32 noisy = input.clone();
GImageMiscOps.addGaussian(noisy, rand, 20, 0, 255);
ImageFloat32 denoised = new ImageFloat32(input.width,input.height);
// How many levels in wavelet transform
int numLevels = 4;
// Create the noise removal algorithm
WaveletDenoiseFilter<ImageFloat32> denoiser =
FactoryImageDenoise.waveletBayes(ImageFloat32.class,numLevels,0,255);
// remove noise from the image
denoiser.process(noisy,denoised);
// display the results
ListDisplayPanel gui = new ListDisplayPanel();
gui.addImage(ConvertBufferedImage.convertTo(input,null),"Input");
gui.addImage(ConvertBufferedImage.convertTo(noisy,null),"Noisy");
gui.addImage(ConvertBufferedImage.convertTo(denoised,null),"Denoised");
ShowImages.showWindow(gui,"Wavelet Noise Removal Example");
}