1 function sm_up = smooth_up(tign,a,b)
2 %applies gradual blurring at different contours of tign
3 % a,b are optional parameters
9 t = linspace(t0,t1,steps);
12 %compute different std. for imgausfilt
18 mx = max(1.0,max(m,n)/a);
21 fprintf('Smooth paramaters : %f %f \n',mn,mx);
22 m = (mn-mx)/(steps-2);
23 y = @(t) mx + m*(t-2);
25 %keep track of the change in ignition time
29 % figure(136),mesh(lon,lat,tign),title('Original')
30 % figure(137),mesh(lon,lat,tign),title('Smoothing')
35 t_blur = imgaussfilt(tign,y(i));
36 t_temp(msk) = t_blur(msk);
37 %figure(138),contour(t_temp,steps,'k')
39 t_diff(i) = min(t_temp(:))-t0;
40 t_temp(m2) = t_temp(m2)-i/steps*t_diff(i);
41 %t_temp = t_temp-i/steps*t_diff(i);
44 % pixel_time_diff = t_temp-tign;
45 % time_slope = pixel_time_diff./t_diff(i);
46 % t_temp3 = t_temp - time_slope.*pixel_time_diff;
47 % t_shift = max(t_temp3,t_temp);
48 %figure,plot(t_diff),title('Change in tign')