I'm looking for a face image alignment code in matlab.Can somebody please help?
Thanks.
This is the method that I used, may be not the only way but this is what I can think about:
reference = [x1,y1; x2,y2; x3,y3;.....;x6,y6];
move = [X1,Y1; X2,Y2; X3,Y3;.....;X6,Y6]
Calculate geometric transformation using: [tform,inlierPtsDistorted,inlierPtsOriginal] = estimateGeometricTransform(move,reference,'similarity');
.
Then, warp the two images as follow: outputView = imref2d(size(referenceImage)); Ir = imwarp(probeImage,tform,'OutputView',outputView);
This method also crop out the background and hair, since my reference image does not contain background and hair part.