ここはサンプルです。私はそれが動作するかどうかはわかりませんが、私はそれがあなたが持っているものよりも近いと思う。
私は専門家ではありません。どうやら、ライブラリをダウンロードするにはmavenが必要です。 http://openimaj.org/UseLibrary.html。残念ながら、私はこのサンプルをテストできません。
幸運にも、より多くのコードサンプルについては、http://openimaj.org/tutorial/processing-your-first-image.htmlを参照してください。
import org.openimaj.image.MBFImage;
import org.openimaj.image.FImage;
//You will need several more imports. Your IDE can handle that.
public class SampleImage {
public static Main(String args[])
{
//Read image in
MBFImage image = ImageUtilities.readMBF(new File("c:\\file.jpg"));
//Print out random information
System.out.println(image.colourSpace);
//Create Object to preform work.
AchantaSaliency test = new AchantaSaliency();
//Get Saliency Map
test.analyseImage(image);
FImage newImage = test.getSaliencyMap();
//Display original image
DisplayUtilities.displayImage(image);
//Display new image
DisplayUtilities.displayImage(newImage);
//Save new image to file
ImageUtilities.write(newImage, new File("C:\\test_output.jpg"));
}
}
ありがとうございました。ほんとうにありがとう。それを試して何かの質問が増えたら尋ねます。心から感謝する! – user118837
私は少し答えを更新しました。イメージではなく、newImageをファイルに書き込みます。 –
私はうまく働くことができました。再度、感謝します。 – user118837