function [reg_seq,T_seq] = CS4640_reg_seq(T,step)
%

len_T = length(T);
ref = T(:,:,:,1);
ref = rgb2gray(ref);
[M,N] = size(ref);
reg_seq = zeros(M,N,length([1:step:len_T]));
reg_seq(:,:,1) = ref;
T_seq(1).T = eye(3,3);

count = 1;
for s = step:step:len_T
    im = T(:,:,:,s);
    img = rgb2gray(im);
    [reg,T] = CS4640_con_reg(ref,img);
    count = count + 1;
    T(count).T = T;
    reg_seq(:,:,count) = reg;
end
