% filter_id.m
% 
% filter image-domain method for better initialization
%
% median and moving average 

f.dir = '/home/longy/data/dect/mmd/2013-12-25/im/';


%------------------------------------------------------------------------------
file_con = [f.dir 'im_priority_34215_results.fld'];
xid = fld_read(file_con);
% add median filter to ID results
for i = 1 : 5
    xidfil(:,:,i) = medfilt2(xid(:,:,i));
end

file_con = [f.dir 'im_priority_34215_results_medfilt.fld']; % model mismatch (size difference)
fld_write(file_con, xidfil)


