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


Java GConvertImage.average方法代码示例

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


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

示例1: BenchmarkDescribe

import boofcv.core.image.GConvertImage; //导入方法依赖的package包/类
public BenchmarkDescribe( Class<I> imageType ) {

		this.imageType = imageType;

		derivType = GImageDerivativeOps.getDerivativeType(imageType);
		integralType = GIntegralImageOps.getIntegralType(imageType);

		colorMS = new MultiSpectral<I>(imageType,width,height,3);
		GImageMiscOps.fillUniform(colorMS, rand, 0, 100);

		gray = GConvertImage.average(colorMS,gray);

		pts = new Point2D_I32[ NUM_POINTS ];
		scales = new double[ NUM_POINTS ];
		yaws = new double[ NUM_POINTS ];
		int border = 20;
		for( int i = 0; i < NUM_POINTS; i++ ) {
			int x = rand.nextInt(width-border*2)+border;
			int y = rand.nextInt(height-border*2)+border;
			pts[i] = new Point2D_I32(x,y);
			scales[i] = rand.nextDouble()*3+1;
			yaws[i] = 2.0*(rand.nextDouble()-0.5)*Math.PI;
		}

	}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:26,代码来源:BenchmarkDescribe.java

示例2: process

import boofcv.core.image.GConvertImage; //导入方法依赖的package包/类
public void process(final BufferedImage buffLeft, final BufferedImage buffRight) {
	imageLeft.reshape(buffLeft.getWidth(), buffLeft.getHeight());
	imageRight.reshape(buffRight.getWidth(), buffRight.getHeight());
	grayLeft.reshape(buffLeft.getWidth(), buffLeft.getHeight());
	grayRight.reshape(buffRight.getWidth(), buffRight.getHeight());

	ConvertBufferedImage.convertFromMulti(buffLeft, imageLeft, imageType);
	ConvertBufferedImage.convertFromMulti(buffRight, imageRight, imageType);
	GConvertImage.average(imageLeft, grayLeft);
	GConvertImage.average(imageRight,grayRight);

	SwingUtilities.invokeLater(new Runnable() {
		public void run() {
			panel.setImages(buffLeft, buffRight);
			processedImage = true;
			doRefreshAll();
		}
	});
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:20,代码来源:VisualizeAssociationMatchesApp.java

示例3: grayMean

import boofcv.core.image.GConvertImage; //导入方法依赖的package包/类
/**
 * Converts the color image into a gray scale image by averaged each pixel across the bands
 */
public SimpleGray grayMean() {
	ImageGray out =
			GeneralizedImageOps.createSingleBand(image.imageType.getDataType(),image.width,image.height);

	GConvertImage.average(image, out);

	return new SimpleGray(out);
}
 
开发者ID:lessthanoptimal,项目名称:BoofProcessing,代码行数:12,代码来源:SimpleColor.java

示例4: detect

import boofcv.core.image.GConvertImage; //导入方法依赖的package包/类
@Override
public void detect(MultiSpectral<T> input) {
	gray.reshape(input.width,input.height);
	grayII.reshape(input.width,input.height);
	bandII.reshape(input.width,input.height);

	GConvertImage.average(input,gray);
	GIntegralImageOps.transform(gray, grayII);
	for( int i = 0; i < input.getNumBands(); i++)
		GIntegralImageOps.transform(input.getBand(i), bandII.getBand(i));

	alg.detect(grayII,bandII);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:14,代码来源:SurfMultiSpectral_to_DetectDescribePoint.java

示例5: setImage

import boofcv.core.image.GConvertImage; //导入方法依赖的package包/类
@Override
public void setImage(MultiSpectral<T> image) {
	gray.reshape(image.width,image.height);
	grayII.reshape(image.width,image.height);
	bandII.reshape(image.width,image.height);

	GConvertImage.average(image, gray);
	GIntegralImageOps.transform(gray, grayII);
	for( int i = 0; i < image.getNumBands(); i++)
		GIntegralImageOps.transform(image.getBand(i), bandII.getBand(i));

	alg.setImage(grayII,bandII);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:14,代码来源:SurfMultiSpectral_to_DescribeRegionPoint.java

示例6: process

import boofcv.core.image.GConvertImage; //导入方法依赖的package包/类
@Override
public boolean process(MultiSpectral<T> input) {
	gray.reshape(input.width,input.height);
	GConvertImage.average(input, gray);
	return motion.process(gray);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:7,代码来源:MsToGrayMotion2D.java


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