Remaps an image to polar coordinates space
dst = cv.linearPolar(src, center, maxRadius)
dst = cv.linearPolar(..., 'OptionName',optionValue, ...)
Input
- src Source image.
- center The transformation center.
- maxRadius The radius of the bounding circle to transform. It
determines the inverse magnitude scale parameter too.
Output
- dst Destination image. It will have same size and type as
src
.
Options
- Interpolation Interpolation method, default 'Linear'. One of:
- Nearest nearest neighbor interpolation
- Linear bilinear interpolation
- Cubic bicubic interpolation
- Lanczos4 Lanczos interpolation over 8x8 neighborhood
- FillOutliers flag, fills all of the destination image pixels. If some
of them correspond to outliers in the source image, they are set to zero.
default true
- InverseMap flag, inverse transformation, default false. For example,
polar transforms:
- flag is not set: Forward transformation
dst(rho,phi) = src(x,y)
- flag is set: Inverse transformation
dst(x,y) = src(rho,phi)
Transform the source image using the following transformation:
dst(rho,phi) = src(x,y)
size(dst) <- size(src)
where:
I = (dx,dy) = (x-center(2), y-center(1))
rho = Kx * magnitude(I)
phi = Ky * angle(I)_{0..360 deg}
and:
Kx = size(src,2) / maxRadius
Ky = size(src,1) / 360
Polar remaps reference:
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.