I am trying to reconstruct an image by evaluating its eigenvalues and eigenvectors. Some of the eigenvalues are negative and when I reconstruct the image using:
imge_rec = (eig_vec)*(eig_values)*(eig_vec)'
I do not obtain the same image. Following is my code and test image: img_in = double(rgb2gray(imread('input.jpg')));
[eig_vec,eig_val] = eig(img_in);
img_rec = eig_vec * eig_val * eig_vec';
figure;
imshow(img_rec,[]);
input image
output image
Best Answer