cv.logPolar - MATLAB File Help |
Remaps an image to semilog-polar coordinates space
dst = cv.logPolar(src, center, M)
dst = cv.logPolar(..., 'OptionName',optionValue, ...)
src
.dst(rho,phi) = src(x,y)
dst(x,y) = src(rho,phi)
Transform the source image using the following transformation (See reference image in cv.linearPolar function):
dst(rho,phi) = src(x,y)
size(dst) <- size(src)
where:
I = (dx,dy) = (x-center(2), y-center(1))
rho = M * log(magnitude(I))
phi = Ky * angle(I)_{0..360 deg}
and:
M = size(src,2) / log(maxRadius)
Ky = size(src,1) / 360
The function emulates the human "foveal" vision and can be used for fast scale and rotation-invariant template matching, for object tracking and so forth.
Note: To calculate magnitude and angle in degrees, cv.cartToPolar is used internally thus angles are measured from 0 to 360 with accuracy about 0.3 degrees.