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


Java FloatProcessor.blurGaussian方法代码示例

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


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

示例1: makeCursorHeatmap

import ij.process.FloatProcessor; //导入方法依赖的package包/类
private BufferedImage makeCursorHeatmap() {
    long time = 0;
    ImagePlus imp;
    int lastx = 0, lasty = 0;
    boolean firstpoint = true;

    FloatProcessor ip = new FloatProcessor(viewer.getThumbnail().getWidth(), viewer.getThumbnail().getHeight());
    Point2D[] cursorArray = trackerFeatures.getCursorArray();
    for (int i = 0; i < cursorArray.length; i++) {
        progressBarFrame.setCurrentFrame(i);
        setProgress((int) ((double) (i * 100) / (double)totalTasks));

        if (cursorArray[i] != null) {
            if (i == 0) {
                time = trackerFeatures.getTracker().getFrame(i).getTimestamp();
            } else {
                time = trackerFeatures.getTracker().getFrame(i).getTimestamp() - time;
            }
            int x = (int) (cursorArray[i].getX() * scalex);
            int y = (int) (cursorArray[i].getY() * scaley);
            if (!firstpoint) {
                drawLine(x, y, lastx, lasty, ip, time);
            }
            lastx = x;
            lasty = y;
            firstpoint = false;
        }
    }
    ip.blurGaussian(10);
    imp = new ImagePlus("Cursor heatmap", ip);
    IJ.run(imp, "Fire", "");
    return imp.getBufferedImage();
}
 
开发者ID:Alanocallaghan,项目名称:qupath-tracking-extension,代码行数:34,代码来源:HeatmapOverlay.java

示例2: makeEyeTrackHeatmap

import ij.process.FloatProcessor; //导入方法依赖的package包/类
private BufferedImage makeEyeTrackHeatmap() {
    long time = 0;
    ImagePlus imp;
    FloatProcessor ip = new FloatProcessor(viewer.getThumbnail().getWidth(), viewer.getThumbnail().getHeight());

    Point2D[] eyeArray = trackerFeatures.getEyeArray();
    for (int i = 0; i < eyeArray.length; i++) {
        progressBarFrame.setCurrentFrame(i);
        setProgress((int) ((double) (i * 100) / (double)totalTasks));
        if (eyeArray[i] != null) {
            if (i == 0) {
                time = trackerFeatures.getTracker().getFrame(i).getTimestamp();
            } else {
                time = trackerFeatures.getTracker().getFrame(i).getTimestamp() - time;
            }

            int x = (int) (eyeArray[i].getX()*scalex);
            int y = (int) (eyeArray[i].getY()*scaley);
            if(x > 0 && y > 0 && x < ip.getWidth() && y < ip.getHeight())
                ip.setf(x, y, ip.getf(x, y) + 100);
        }
    }
    ip.blurGaussian(25);
    imp = new ImagePlus("Eye heatmap", ip);
    IJ.run(imp, "Fire", "");
    return imp.getBufferedImage();
}
 
开发者ID:Alanocallaghan,项目名称:qupath-tracking-extension,代码行数:28,代码来源:HeatmapOverlay.java

示例3: blur

import ij.process.FloatProcessor; //导入方法依赖的package包/类
public static Grid2D blur(Grid2D in, double sigma){
	FloatProcessor img = ImageUtil.wrapGrid2D(new Grid2D(in));
	img.blurGaussian(sigma);
	return ImageUtil.wrapFloatProcessor(img);
}
 
开发者ID:akmaier,项目名称:CONRAD,代码行数:6,代码来源:TreeExample.java


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