本文整理汇总了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());
}
示例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());
}
示例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");
}
示例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");
}
示例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;
}
示例6: blurMean
import boofcv.alg.filter.blur.GBlurImageOps; //导入依赖的package包/类
public SimpleColor blurMean( int radius ) {
return new SimpleColor(GBlurImageOps.mean(image, null, radius, null));
}
示例7: blurMedian
import boofcv.alg.filter.blur.GBlurImageOps; //导入依赖的package包/类
public SimpleColor blurMedian( int radius ) {
return new SimpleColor(GBlurImageOps.median(image, null, radius));
}
示例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));
}
示例9: blurMean
import boofcv.alg.filter.blur.GBlurImageOps; //导入依赖的package包/类
public SimpleGray blurMean( int radius ) {
return new SimpleGray(GBlurImageOps.mean(image, null, radius, null));
}
示例10: blurMedian
import boofcv.alg.filter.blur.GBlurImageOps; //导入依赖的package包/类
public SimpleGray blurMedian( int radius ) {
return new SimpleGray(GBlurImageOps.median(image, null, radius));
}
示例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));
}
示例12: process
import boofcv.alg.filter.blur.GBlurImageOps; //导入依赖的package包/类
@Override
public void process() {
GBlurImageOps.gaussian(input, output, -1, radius, storage);
}