-1
我正在嘗試使用ImageJ中的this java class來消除我在java中的圖像。如何在Java代碼中實現ImageJ的非本地平均去噪算法?
我嘗試使我結合這個測試類these two classes (the github page linked to from ImageJ's website):
import ij.ImagePlus;
import ij.process.ByteProcessor;
import ij.process.ImageProcessor;
public class Test {
public static void main(String[] args) {
String directory = "C:\\Users\\Speedy Octopus\\Desktop\\Noise Reduction\\Before Denoising.JPG";
BufferedImage image = ImageUtility.loadImage(directory);
ImageProcessor ip = new ByteProcessor(image.getWidth(), image.getHeight());
String title = "New Image";
ImagePlus imp = new ImagePlus(title, ip);
NLMeansDenoising_ nlmd = new NLMeansDenoising_();
nlmd.setup("final", imp);
nlmd.run(ip);
}
}
但我似乎無法得到nlmd.setup()正確。
任何幫助將不勝感激。