OpenLvVision_OpenCv.lvlib:Norm.vim

Calculates an absolute difference norm or a relative difference norm.

The function norm calculates the absolute norm of an array or the absolute difference norm of two arrays:

  • Absolute Norm (when there is no second array src2):
    $ \| \texttt{src1} \|_L = \begin{cases} \| \texttt{src1} \|_{L\infty} = \max_I | \texttt{src1}(I) | & \text{if } \texttt{normType} = \texttt{NORM\_INF} \\ \| \texttt{src1} \|_{L1} = \sum_I | \texttt{src1}(I) | & \text{if } \texttt{normType} = \texttt{NORM\_L1} \\ \| \texttt{src1} \|_{L2} = \sqrt{\sum_I \texttt{src1}(I)^2} & \text{if } \texttt{normType} = \texttt{NORM\_L2} \end{cases} $
  • Absolute Difference Norm (when there is a second array src2):
    $ \| \texttt{src1} - \texttt{src2} \|_L = \begin{cases} \| \texttt{src1} - \texttt{src2} \|_{L\infty} = \max_I | \texttt{src1}(I) - \texttt{src2}(I) | & \text{if } \texttt{normType} = \texttt{NORM\_INF} \\ \| \texttt{src1} - \texttt{src2} \|_{L1} = \sum_I | \texttt{src1}(I) - \texttt{src2}(I) | & \text{if } \texttt{normType} = \texttt{NORM\_L1} \\ \| \texttt{src1} - \texttt{src2} \|_{L2} = \sqrt{\sum_I (\texttt{src1}(I) - \texttt{src2}(I))^2} & \text{if } \texttt{normType} = \texttt{NORM\_L2} \end{cases} $
  • Relative Difference Norm (when normType is NORM_RELATIVE):
    $ \| \texttt{src1} - \texttt{src2} \|_L / \| \texttt{src2} \|_L $

Where I is a multi-dimensional index of array elements. In case of multi-channel arrays, the norm is calculated over all channels.

For detailed information, please refer to the OpenCV documentation

OpenLvVision_OpenCv.lvlib:Norm.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

Src1

first input array.

cOpenLvVision__OpenCv_lvlib_Anythinglvclass

Src2

second input array of the same size and the same type as src1.

cOpenLvVision__OpenCv_lvlib_Anythinglvclass

Mask

optional operation mask; it must have the same size as src1 and CV_8UC1 type.

ci32

NormType

NORM_L1

NORM_L2

NORM_L2SQR

NORM_HAMMING

NORM_HAMMING2

NORM_TYPE_MASK

NORM_RELATIVE

NORM_MINMAX

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.

idbl

Norm