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

2 views (last 30 days)
%%store
st.names = {'mic','shelly','linoy','libi','exface1','exface2'};
st.data{1} = mic1;
st.data{2} = shelly1;
st.data{3} = linoy1;
st.data{4} = libi1;
st.data{5} = extraface1;
st.data{6} = extraface2;
z = [mic1 shelly1 linoy1 ; libi1 extraface1 extraface2];
figure(6),imshow(z,'Initialmagnification','fit');;title('z')
save classFile st;
clear all, close all;
load classFile;
M=6;N=50;
avImg=zeros(N);
z = [ st.data{1} st.data{2} st.data{3}; st.data{4} st.data{5} st.data{6}];
figure(1),imshow(z,'Initialmagnification','fit');;title('z org')

Accepted Answer

Image Analyst
Image Analyst on 14 Mar 2015
Please read the FAQ: http://matlab.wikia.com/wiki/FAQ#What_is_a_cell_array.3F 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.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!