OpenLvVision_OpenCv.lvlib:Sobel.vim

Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator.

In all cases except one, the $\texttt{ksize} \times \texttt{ksize}$ separable kernel is used to calculate the derivative. When $\texttt{ksize} = 1$, the $3 \times 1$ or $1 \times 3$ kernel is used (that is, no Gaussian smoothing is done). ksize = 1 can only be used for the first or the second $x$- or $y$- derivatives.

There is also the special value ksize = FILTER_SCHARR (-1) that corresponds to the $3 \times 3$ Scharr filter that may give more accurate results than the $3 \times 3$ Sobel. The Scharr aperture for the $x$-derivative is:

$ \begin{bmatrix} -3 & 0 & 3 \\ -10 & 0 & 10 \\ -3 & 0 & 3 \end{bmatrix} $

or transposed for the $y$-derivative.

The function calculates an image derivative by convolving the image with the appropriate kernel:

$ \texttt{dst} = \frac{\partial^{xorder+yorder} \texttt{src}}{\partial x^{xorder} \partial y^{yorder}} $

The Sobel operators combine Gaussian smoothing and differentiation, so the result is more or less resistant to noise. Most often, the function is called with (xorder = 1, yorder = 0, ksize = 3) or (xorder = 0, yorder = 1, ksize = 3) to calculate the first $x$- or $y$- image derivative.

The first case (x-derivative) corresponds to a kernel of:

$ \begin{bmatrix} -1 & 0 & 1 \\ -2 & 0 & 2 \\ -1 & 0 & 1 \end{bmatrix} $

The second case (y-derivative) corresponds to a kernel of:

$ \begin{bmatrix} -1 & -2 & -1 \\ 0 & 0 & 0 \\ 1 & 2 & 1 \end{bmatrix} $

For detailed information, please refer to the OpenCV documentation

OpenLvVision_OpenCv.lvlib:Sobel.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 of the same size and the same number of channels as src.

ci32

BorderTypes

pixel extrapolation method, see BorderTypes. BORDER_WRAP is not supported

BORDER_CONSTANT = 0, !< `iiiiii|abcdefgh|iiiiiii` with some specified `i`

BORDER_REPLICATE = 1, `aaaaaa|abcdefgh|hhhhhhh`

BORDER_REFLECT = 2, `fedcba|abcdefgh|hgfedcb`

BORDER_WRAP = 3, `cdefgh|abcdefgh|abcdefg`

BORDER_REFLECT_101 = 4, `gfedcb|abcdefgh|gfedcba`

BORDER_TRANSPARENT = 5, `uvwxyz|abcdefgh|ijklmno` - Treats outliers as transparent.

BORDER_ISOLATED = 16 Interpolation restricted within the ROI boundaries.

cnclst

derivative

order of the derivatives.

    ci32

    X

    order of the derivative x.

    ci32

    Y

    order of the derivative y.

cdbl

scale

optional scale factor for the computed derivative values; by default, no scaling is applied (see getDerivKernels for details).

cdbl

delta

optional delta value that is added to the results prior to storing them in dst.

ci32

ksize

size of the extended Sobel kernel; it must be 1, 3, 5, or 7.

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 out

output image of the same size and the same number of channels as src.