本文整理汇总了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());
}
}
示例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());
}
}
示例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());
}
}
示例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());
}
}
示例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());
}
}
示例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());
}
}
示例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());
}
}
示例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());
}
}
示例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());
}
}
示例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());
}
}
示例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());
}
}
示例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());
}
}