当前位置: 首页>>代码示例>>Java>>正文


Java FactoryImageDenoise类代码示例

本文整理汇总了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());
	}
}
 
开发者ID:android-workloads,项目名称:JACWfA,代码行数:20,代码来源:DenoiseBayes.java

示例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());
	}
}
 
开发者ID:android-workloads,项目名称:JACWfA,代码行数:18,代码来源:DenoiseSure.java

示例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());
	}
}
 
开发者ID:android-workloads,项目名称:JACWfA,代码行数:21,代码来源:DenoiseVisu.java

示例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);
    }
 
开发者ID:echopen,项目名称:PRJ-medtec_androidapp,代码行数:31,代码来源:PostProcessing.java

示例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);
}
 
开发者ID:echopen,项目名称:PRJ-medtec_androidapp,代码行数:16,代码来源:WaveletDenoise.java

示例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");
	}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:28,代码来源:ExampleWaveletDenoise.java


注:本文中的boofcv.abst.denoise.FactoryImageDenoise类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。