Home > track > create_radial_mean_kernel.m

create_radial_mean_kernel

PURPOSE ^

k : k x k kernel

SYNOPSIS ^

function [rm_k] = create_radial_mean_kernel ( k, rm_k_max )

DESCRIPTION ^

 k : k x k kernel
 rm_k_max : maximum radius value.  This defines the resolution of the
 kernel

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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 );

Generated on Thu 17-Mar-2011 14:45:51 by m2html © 2005