Face Normalisation using Affine transform
1 view (last 30 days)
Show older comments
Hello sir, I am working on face recognition project. In that I have one frontal face and one rotated face. Also I have few key points on the faces(Test image and train image). Then using those key point which are matching points I want to Normalise the rotated face into frontal face. I want to use warping function, but if I use that my whole image is getting rotated, I don't want to rotate whole image,only the face should get rotated(or aligned). The code I am using is as:
movingPoints =[38 29;23 36;29 50;30 67];
fixedPoints =[49 26;27 30;47 46;42 61];
tform = fitgeotrans(movingPoints,fixedPoints,'similarity');
Tinv = tform.invert.T;
ss = Tinv(2,1);
sc = Tinv(1,1);
scaleRecovered = sqrt(ss*ss + sc*sc)
thetaRecovered = -atan2(ss,sc)*180/pi
transform = imwarp(img,tform,'OutputView',imref2d(size(Img3)));
figure,imshow(transform)
What is wrong in my code or in my concept? Please help.
Thank you. :)
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!