OpenLvVision_OpenCv.lvlib:WarpPolar.vim

Remaps an image to polar or semilog-polar coordinates space.

The function transforms the source image using the following mapping:

$ \texttt{dst}(\rho,\phi) = \texttt{src}(x,y) $

where

$ \begin{aligned} \vec{I} &= (x - \texttt{center.x},\; y - \texttt{center.y}) \\ \phi &= K_{\text{angle}} \cdot \texttt{angle}(\vec{I}) \\ \rho &= \begin{cases} K_{\text{lin}} \cdot \texttt{magnitude}(\vec{I}), & \text{default} \\ K_{\text{log}} \cdot \log_e(\texttt{magnitude}(\vec{I})), & \text{if semilog} \end{cases} \end{aligned} $

and

$ \begin{aligned} K_{\text{angle}} &= \frac{\texttt{dsize.height}}{2\pi} \\ K_{\text{lin}} &= \frac{\texttt{dsize.width}}{\texttt{maxRadius}} \\ K_{\text{log}} &= \frac{\texttt{dsize.width}}{\log_e(\texttt{maxRadius})} \end{aligned} $

Linear vs semilog mapping

Polar mapping can be linear or semi-log. Add one of WarpPolarMode to the flags to specify the mapping mode. Linear mapping is the default.

The semilog mapping emulates human “foveal” vision, providing high acuity near the center and lower acuity in the periphery.

Output image size rules:

  • If both values in dsize ≤ 0 (default):
$ \begin{aligned} \texttt{dsize.area} &\leftarrow \texttt{maxRadius}^2 \cdot \pi \\ \texttt{dsize.width} &= \texttt{cvRound}(\texttt{maxRadius}) \\ \texttt{dsize.height} &= \texttt{cvRound}(\texttt{maxRadius} \cdot \pi) \end{aligned} $
  • If only dsize.height ≤ 0:
$ \texttt{dsize.height} = \texttt{cvRound}(\texttt{dsize.width} \cdot \pi) $
  • If both values in dsize > 0:

The destination image will have the specified size, and the bounding circle area is scaled accordingly.

For detailed information, please refer to the OpenCV documentation

OpenLvVision_OpenCv.lvlib:WarpPolar.vim

cerrcodeclst

error in

error in can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs.

Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

    cbool

    status

    status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

    Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

    ci32

    code

    cstr

    source

    source describes the origin of the error or warning.

    Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

cOpenLvVision__OpenCv_lvlib_Anythinglvclass

Src

input image.

cOpenLvVision__OpenCv_lvlib_Anythinglvclass

Dst

output image that has the size dsize and the same type as src .

cnclst

dsize

The destination image size (see description for valid options).

    ci32

    X

    ci32

    Y

cnclst

center

The transformation center.

    csgl

    X

    csgl

    Y

cdbl

maxRadius

The radius of the bounding circle to transform. It determines the inverse magnitude scale parameter too.

ci32

Flags

A combination of interpolation methods, InterpolationFlags + WarpPolarMode.

Add WARP_POLAR_LINEAR to select linear polar mapping (default)

Add WARP_POLAR_LOG to select semilog polar mapping

Add WARP_INVERSE_MAP for reverse mapping.

ierrcodeclst

error out

error in can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs.

Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

    ibool

    status

    status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

    Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

    ii32

    code

    istr

    source

    source describes the origin of the error or warning.

    Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

iOpenLvVision__OpenCv_lvlib_Anythinglvclass

Dst

output image that has the size dsize and the same type as src .