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