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