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


Java UtilImageIO.loadPGM_U8方法代码示例

本文整理汇总了Java中boofcv.io.image.UtilImageIO.loadPGM_U8方法的典型用法代码示例。如果您正苦于以下问题:Java UtilImageIO.loadPGM_U8方法的具体用法?Java UtilImageIO.loadPGM_U8怎么用?Java UtilImageIO.loadPGM_U8使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在boofcv.io.image.UtilImageIO的用法示例。


在下文中一共展示了UtilImageIO.loadPGM_U8方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import boofcv.io.image.UtilImageIO; //导入方法依赖的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.io.image.UtilImageIO; //导入方法依赖的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.io.image.UtilImageIO; //导入方法依赖的package包/类
@Override
public void init(RunConfig config) throws InvalidTestFormatException {
	super.init(config);

	File file = new File(GR.getGoldenDir(), goldenFileName);
	try {
		InputStream inImageStream = MTTestResourceManager.openFileAsInputStream(file.getPath());
		ImageUInt8 inImage = UtilImageIO.loadPGM_U8(inImageStream, (ImageUInt8) null);
		image = ConvertImage.convert(inImage, (ImageFloat32) null);
		ImageUInt8 bin = new ImageUInt8(image.width, image.height);
		double mean = ImageStatistics.mean(image);
		ThresholdImageOps.threshold(image, bin, (float) mean, true);
		filtered = BinaryImageOps.erode8(bin, 1, null);
		filtered = BinaryImageOps.dilate8(filtered, 1, null);
	} catch (IOException e) {
		throw new GoldenFileNotFoundException(file, this.getClass());
	}
}
 
开发者ID:android-workloads,项目名称:JACWfA,代码行数:19,代码来源:FitEllipse.java

示例4: init

import boofcv.io.image.UtilImageIO; //导入方法依赖的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

示例5: init

import boofcv.io.image.UtilImageIO; //导入方法依赖的package包/类
@Override
public void init(RunConfig config) throws InvalidTestFormatException {
	super.init(config);
	File file = new File(GR.getGoldenDir(), goldenFileName);
	try {
		InputStream inImageStream = MTTestResourceManager.openFileAsInputStream(file.getPath());
		image = UtilImageIO.loadPGM_U8(inImageStream, (ImageUInt8) null);
		blurred = new ImageUInt8(image.width, image.height);
	} catch (IOException e) {
		throw new GoldenFileNotFoundException(file, this.getClass());
	}
}
 
开发者ID:android-workloads,项目名称:JACWfA,代码行数:13,代码来源:BlurGaussian.java

示例6: init

import boofcv.io.image.UtilImageIO; //导入方法依赖的package包/类
@Override
public void init(RunConfig config) throws InvalidTestFormatException {
	super.init(config);
	
	File file = new File(GR.getGoldenDir(), goldenFileName);
	try {
		InputStream inImageStream = MTTestResourceManager.openFileAsInputStream(file.getPath());
		image = UtilImageIO.loadPGM_U8(inImageStream, (ImageUInt8) null);
		canny = new ImageUInt8(image.width, image.height);
		detector = FactoryEdgeDetectors.canny(2, true, true, ImageUInt8.class,ImageSInt16.class);
	} catch (IOException e) {
		throw new GoldenFileNotFoundException(file, this.getClass());
	}
}
 
开发者ID:android-workloads,项目名称:JACWfA,代码行数:15,代码来源:DetectEdges.java

示例7: init

import boofcv.io.image.UtilImageIO; //导入方法依赖的package包/类
@Override
public void init(RunConfig config) throws InvalidTestFormatException {
	super.init(config);
	File file = new File(GR.getGoldenDir(), goldenFileName);
	try {
		InputStream inImageStream = MTTestResourceManager.openFileAsInputStream(file.getPath());
		image = UtilImageIO.loadPGM_U8(inImageStream, (ImageUInt8) null);
		result = new ImageUInt8(image.width, image.height);
	} catch (IOException e) {
		throw new GoldenFileNotFoundException(file, this.getClass());
	}
}
 
开发者ID:android-workloads,项目名称:JACWfA,代码行数:13,代码来源:EnhancementSharpen4.java

示例8: init

import boofcv.io.image.UtilImageIO; //导入方法依赖的package包/类
@Override
public void init(RunConfig config) throws InvalidTestFormatException {
	super.init(config);

	File file = new File(GR.getGoldenDir(), goldenFileName);
	try {
		InputStream inImageStream = MTTestResourceManager.openFileAsInputStream(file.getPath());
		image = UtilImageIO.loadPGM_U8(inImageStream, (ImageUInt8) null);
		detector = FactoryInterestPoint.fastHessian(new ConfigFastHessian(
				10, 2, 100, 2, 9, 3, 4));
	} catch (IOException e) {
		throw new GoldenFileNotFoundException(file, this.getClass());
	}
}
 
开发者ID:android-workloads,项目名称:JACWfA,代码行数:15,代码来源:DetectPoints.java

示例9: init

import boofcv.io.image.UtilImageIO; //导入方法依赖的package包/类
@Override
public void init(RunConfig config) throws InvalidTestFormatException {
	super.init(config);
	File file = new File(GR.getGoldenDir(), goldenFileName);
	try {
		InputStream inImageStream = MTTestResourceManager.openFileAsInputStream(file.getPath());
		ImageUInt8 inImage = UtilImageIO.loadPGM_U8(inImageStream, (ImageUInt8) null);
		image = ConvertImage.convert(inImage, (ImageFloat32) null);
		binary = new ImageUInt8(image.width, image.height);
	} catch (IOException e) {
		throw new GoldenFileNotFoundException(file, this.getClass());
	}
}
 
开发者ID:android-workloads,项目名称:JACWfA,代码行数:14,代码来源:BinaryImage.java

示例10: init

import boofcv.io.image.UtilImageIO; //导入方法依赖的package包/类
@Override
public void init(RunConfig config) throws InvalidTestFormatException {
	super.init(config);
	File file = new File(GR.getGoldenDir(), goldenFileName);
	try {
		InputStream inImageStream = MTTestResourceManager.openFileAsInputStream(file.getPath());
		image = UtilImageIO.loadPGM_U8(inImageStream, (ImageUInt8) null);
		result = new ImageUInt8(image.width, image.height);
		histo = new int[256];
		trans = new int[256];
	} catch (IOException e) {
		throw new GoldenFileNotFoundException(file, this.getClass());
	}
}
 
开发者ID:android-workloads,项目名称:JACWfA,代码行数:15,代码来源:EnhancementHistogram.java

示例11: init

import boofcv.io.image.UtilImageIO; //导入方法依赖的package包/类
@Override
public void init(RunConfig config) throws InvalidTestFormatException {
	super.init(config);

	File file = new File(GR.getGoldenDir(), goldenFileName);
	try {
		InputStream inImageStream = MTTestResourceManager.openFileAsInputStream(file.getPath());
		image = UtilImageIO.loadPGM_U8(inImageStream, (ImageUInt8) null);
		result = new ImageUInt8(image.width, image.height);
	} catch (IOException e) {
		throw new GoldenFileNotFoundException(file, this.getClass());
	}
}
 
开发者ID:android-workloads,项目名称:JACWfA,代码行数:14,代码来源:EnhancementSharpen8.java

示例12: init

import boofcv.io.image.UtilImageIO; //导入方法依赖的package包/类
@Override
public void init(RunConfig config) throws InvalidTestFormatException {
	super.init(config);

	File file = new File(GR.getGoldenDir(), goldenFileName);
	try {
		InputStream inImageStream = MTTestResourceManager.openFileAsInputStream(file.getPath());
		ImageUInt8 inImage = UtilImageIO.loadPGM_U8(inImageStream, (ImageUInt8) null);
		image = ConvertImage.convert(inImage, (ImageFloat32) null);
		dft = DiscreteFourierTransformOps.createTransformF32();
		transform = new InterleavedF32(image.width, image.height, 2);
	} catch (IOException e) {
		throw new GoldenFileNotFoundException(file, this.getClass());
	}
}
 
开发者ID:android-workloads,项目名称:JACWfA,代码行数:16,代码来源:DFT.java


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