k : k x k kernel rm_k_max : maximum radius value. This defines the resolution of the kernel
0001 function [rm_k] = create_radial_mean_kernel ( k, rm_k_max ) 0002 0003 % k : k x k kernel 0004 % rm_k_max : maximum radius value. This defines the resolution of the 0005 % kernel 0006 0007 kh = floor(k/2); 0008 0009 temp = logical ( zeros (k,k ) ); 0010 temp(kh+1,kh+1) = true; 0011 rm_k = floor(bwdist (temp)); 0012 max_dist = max ( rm_k(:) ); 0013 f = double(rm_k_max+1) / double ( floor(max_dist)+1 ); 0014 0015 rm_k = floor( rm_k * f );