Face Normalisation using Affine transform

조회 수: 3 (최근 30일)
Nachiket Patki
Nachiket Patki 2016년 6월 2일
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개)

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by