% LOGPOLARGAUSS - Log Polar Transform with Gaussian Sampling % % Usage: % % function lp = logpolarGauss(im,x0,y0,r,s,m,sig) % % Arguments: % % im = The image. % x0,y0 = position in im. % r = Radius in pixels. % s = size of the logolar image. % m = mask size. % sig = sigma of the Gaussian funcion. % % Returns: % % lp = logpolar image. % % Copyright (c) 2012-2013 Anders Hast % Uppsala University % http://www.cb.uu.se/~aht % % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software and associated documentation files (the "Software"), to deal % in the Software without restriction, subject to the following conditions: % % The above copyright notice and this permission notice shall be included in % all copies or substantial portions of the Software. % % The Software is provided "as is", without warranty of any kind. % function lp = logpolarGauss(im,x0,y0,r,s,m,sig) lp=zeros(s,s); k1=log(r+1)/(s-1); k2=s/(2*pi); for i=1:s for j=1:s t=j/k2; e=exp((i-1)*k1)-1; x=e*cos(t)+x0; y=e*sin(t)+y0; lp(i,j) = Sample2D(im,x,y,m,sig); end end end