我想使用 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 ?