ここで openImaj を使用して自由に使えるいくつかの顔を揃えたいと思います。jpgの顔写真を読み込んで位置合わせし、最終的に位置合わせ後にjpgのまま保存したいです。ここが私が立ち往生している場所です。下記参照
public class FaceImageAlignment {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
// TODO code application logic here
BufferedImage img = null;
img = ImageIO.read(new File("D:/face_test.jpg"));
//How to align face image using openImaj
//This is where I am stuck on doing face alignment. I tried doing the following
AffineAligner imgAlign = new AffineAligner();
//but I could not figure out how to do face alignment with it
BufferedImage imgAligned = new BufferedImage(//I will need to put aligned Image here as a BufferedImage);
File f = new File("D:\\face_aligned.jpg");
ImageIO.write(imgAligned, "JPEG", f);
}
}
face_test.jpg を face_aligned.jpg に揃えるには、どのコードが必要ですか?