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


Java GBlurImageOps类代码示例

本文整理汇总了Java中boofcv.alg.filter.blur.GBlurImageOps的典型用法代码示例。如果您正苦于以下问题:Java GBlurImageOps类的具体用法?Java GBlurImageOps怎么用?Java GBlurImageOps使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: generalized

import boofcv.alg.filter.blur.GBlurImageOps; //导入依赖的package包/类
public static <T extends ImageSingleBand, D extends ImageSingleBand>
void generalized( T input )
{
	Class<T> inputType = (Class<T>)input.getClass();
	Class<D> derivType = GImageDerivativeOps.getDerivativeType(inputType);

	T blurred = GeneralizedImageOps.createSingleBand(inputType, input.width, input.height);
	D derivX = GeneralizedImageOps.createSingleBand(derivType, input.width, input.height);
	D derivY = GeneralizedImageOps.createSingleBand(derivType, input.width, input.height);

	// Gaussian blur: Convolve a Gaussian kernel
	GBlurImageOps.gaussian(input, blurred, -1, blurRadius, null);

	// Calculate image's derivative
	GImageDerivativeOps.sobel(blurred, derivX, derivY, BorderType.EXTENDED);

	// display the results
	BufferedImage outputImage = VisualizeImageData.colorizeSign(derivX,null,-1);
	ShowImages.showWindow(outputImage,"Generalized "+inputType.getSimpleName());
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:21,代码来源:ExampleImageFilter.java

示例2: nogenerics

import boofcv.alg.filter.blur.GBlurImageOps; //导入依赖的package包/类
public static void nogenerics( ImageSingleBand input )
{
	Class inputType = input.getClass();
	Class derivType = GImageDerivativeOps.getDerivativeType(inputType);

	ImageSingleBand blurred = GeneralizedImageOps.createSingleBand(inputType, input.width, input.height);
	ImageSingleBand derivX = GeneralizedImageOps.createSingleBand(derivType, input.width, input.height);
	ImageSingleBand derivY = GeneralizedImageOps.createSingleBand(derivType, input.width, input.height);

	// Gaussian blur: Convolve a Gaussian kernel
	GBlurImageOps.gaussian(input, blurred, -1, blurRadius, null);

	// Calculate image's derivative
	GImageDerivativeOps.sobel(blurred, derivX, derivY, BorderType.EXTENDED);

	// display the results
	BufferedImage outputImage = VisualizeImageData.colorizeSign(derivX,null,-1);
	ShowImages.showWindow(outputImage,"Generalized "+inputType.getSimpleName());
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:20,代码来源:ExampleImageFilter.java

示例3: process

import boofcv.alg.filter.blur.GBlurImageOps; //导入依赖的package包/类
public void process( BufferedImage image ) {
	I input = GeneralizedImageOps.createSingleBand(imageType, image.getWidth(), image.getHeight());
	I blur = GeneralizedImageOps.createSingleBand(imageType, image.getWidth(), image.getHeight());

	ConvertBufferedImage.convertFromSingle(image, input, imageType);
	GBlurImageOps.gaussian(input, blur, -1, 2, null);

	DetectLineHoughFoot<I,D> alg =  FactoryDetectLineAlgs.houghFoot(6, 12, 5, 25, 10, imageType, derivType);

	ImageLinePanel gui = new ImageLinePanel();
	gui.setBackground(image);
	gui.setLines(alg.detect(blur));
	gui.setPreferredSize(new Dimension(image.getWidth(),image.getHeight()));

	BufferedImage renderedTran = VisualizeImageData.grayMagnitude(alg.getTransform().getTransform(),null,-1);
	BufferedImage renderedBinary = VisualizeBinaryData.renderBinary(alg.getBinary(), null);

	ShowImages.showWindow(renderedBinary,"Detected Edges");
	ShowImages.showWindow(renderedTran,"Parameter Space");
	ShowImages.showWindow(gui,"Detected Lines");
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:22,代码来源:VisualizeHoughFoot.java

示例4: process

import boofcv.alg.filter.blur.GBlurImageOps; //导入依赖的package包/类
public void process( BufferedImage image ) {
	I input = GeneralizedImageOps.createSingleBand(imageType, image.getWidth(), image.getHeight());
	I blur = GeneralizedImageOps.createSingleBand(imageType, image.getWidth(), image.getHeight());

	ConvertBufferedImage.convertFromSingle(image, input, imageType);
	GBlurImageOps.gaussian(input, blur, -1, 2, null);

	DetectLineHoughPolar<I,D> alg =  FactoryDetectLineAlgs.houghPolar(5, 10, 2, Math.PI / 180, 25, 10, imageType, derivType);

	List<LineParametric2D_F32> lines = alg.detect(blur);

	ImageLinePanel gui = new ImageLinePanel();
	gui.setBackground(image);
	gui.setLines(lines);
	gui.setPreferredSize(new Dimension(image.getWidth(),image.getHeight()));

	BufferedImage renderedTran = VisualizeImageData.grayMagnitude(alg.getTransform().getTransform(),null,-1);
	BufferedImage renderedBinary = VisualizeBinaryData.renderBinary(alg.getBinary(), null);

	ShowImages.showWindow(renderedBinary,"Detected Edges");
	ShowImages.showWindow(renderedTran,"Parameter Space");
	ShowImages.showWindow(gui,"Detected Lines");
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:24,代码来源:VisualizeHoughPolar.java

示例5: gaussianFilterSpatial

import boofcv.alg.filter.blur.GBlurImageOps; //导入依赖的package包/类
public static ArrayList<GrayU8> gaussianFilterSpatial(ArrayList<GrayU8> input, ArrayList<GrayU8> output, int spatialRadius){
	
	for (int i = 0; i < input.size(); ++i){
		GBlurImageOps.gaussian(input.get(i), output.get(i), -1, spatialRadius, null);
	}
	
	return output;
}
 
开发者ID:vitrivr,项目名称:cineast,代码行数:9,代码来源:MaskGenerator.java

示例6: blurMean

import boofcv.alg.filter.blur.GBlurImageOps; //导入依赖的package包/类
public SimpleColor blurMean( int radius ) {
	return new SimpleColor(GBlurImageOps.mean(image, null, radius, null));
}
 
开发者ID:lessthanoptimal,项目名称:BoofProcessing,代码行数:4,代码来源:SimpleColor.java

示例7: blurMedian

import boofcv.alg.filter.blur.GBlurImageOps; //导入依赖的package包/类
public SimpleColor blurMedian( int radius ) {
	return new SimpleColor(GBlurImageOps.median(image, null, radius));
}
 
开发者ID:lessthanoptimal,项目名称:BoofProcessing,代码行数:4,代码来源:SimpleColor.java

示例8: blurGaussian

import boofcv.alg.filter.blur.GBlurImageOps; //导入依赖的package包/类
/**
 * @see boofcv.alg.filter.blur.GBlurImageOps#gaussian
 */
public SimpleColor blurGaussian( double sigma, int radius ) {
	return new SimpleColor(GBlurImageOps.gaussian(image, null, sigma, radius, null));
}
 
开发者ID:lessthanoptimal,项目名称:BoofProcessing,代码行数:7,代码来源:SimpleColor.java

示例9: blurMean

import boofcv.alg.filter.blur.GBlurImageOps; //导入依赖的package包/类
public SimpleGray blurMean( int radius ) {
	return new SimpleGray(GBlurImageOps.mean(image, null, radius, null));
}
 
开发者ID:lessthanoptimal,项目名称:BoofProcessing,代码行数:4,代码来源:SimpleGray.java

示例10: blurMedian

import boofcv.alg.filter.blur.GBlurImageOps; //导入依赖的package包/类
public SimpleGray blurMedian( int radius ) {
	return new SimpleGray(GBlurImageOps.median(image, null, radius));
}
 
开发者ID:lessthanoptimal,项目名称:BoofProcessing,代码行数:4,代码来源:SimpleGray.java

示例11: blurGaussian

import boofcv.alg.filter.blur.GBlurImageOps; //导入依赖的package包/类
/**
 * @see GBlurImageOps#gaussian
 */
public SimpleGray blurGaussian( double sigma, int radius ) {
	return new SimpleGray(GBlurImageOps.gaussian(image, null, sigma, radius, null));
}
 
开发者ID:lessthanoptimal,项目名称:BoofProcessing,代码行数:7,代码来源:SimpleGray.java

示例12: process

import boofcv.alg.filter.blur.GBlurImageOps; //导入依赖的package包/类
@Override
public void process() {
	GBlurImageOps.gaussian(input, output, -1, radius, storage);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:5,代码来源:BenchmarkForOpenCV.java


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