MATLAB: Hi , I need to understand this code for the project , the project about face recognition and I need to understand this ,, Thx any way ^^

#face recognitionfr

st.names = {'mic','shelly','linoy','libi','exface1','exface2'};{1} = mic1;{2} = shelly1;{3} = linoy1;{4} = libi1;{5} = extraface1;{6} = extraface2;
z = [mic1 shelly1 linoy1 ; libi1 extraface1 extraface2];
save classFile st;
clear all, close all;
load classFile;
z = [{1}{2}{3};{4}{5}{6}];
figure(1),imshow(z,'Initialmagnification','fit');;title('z org')

Best Answer

  • Please read the FAQ: for a good intuitive discussion of cell arrays. The code stitches together images stored in cells that are members (fields) of a structure variable. Then it displays the one big montage image.
    The second chunk of the code saves that structure to a .mat file, then reloads it, stitches the images together again, and displays it again.
    It looks like the code is intended to create an image with a bunch of faces so that some later face recognition code can pick out one single particular face from the group of 6 in the picture.