Subtract
OpenLvVision_OpenCv.lvlib:Subtract.vim
Calculates the per-element difference between two arrays or array and a scalar.
The function subtract calculates:
- Difference between two arrays (when both input arrays have the same size and the same number of channels):$ \texttt{dst}(I) = \texttt{saturate}(\texttt{src1}(I) - \texttt{src2}(I)) \quad \texttt{if mask}(I) \ne 0 $
- Difference between an array and a scalar (when
src2
is constructed fromScalar
or has the same number of elements assrc1.channels()
):$ \texttt{dst}(I) = \texttt{saturate}(\texttt{src1}(I) - \texttt{src2}) \quad \texttt{if mask}(I) \ne 0 $ - Difference between a scalar and an array (when
src1
is constructed fromScalar
or has the same number of elements assrc2.channels()
):$ \texttt{dst}(I) = \texttt{saturate}(\texttt{src1} - \texttt{src2}(I)) \quad \texttt{if mask}(I) \ne 0 $ - Reverse difference (SubRS variant) between a scalar and an array:$ \texttt{dst}(I) = \texttt{saturate}(\texttt{src2} - \texttt{src1}(I)) \quad \texttt{if mask}(I) \ne 0 $
Where I
is a multi-dimensional index of array elements. In case of multi-channel arrays, each channel is processed independently.
For detailed information, please refer to the OpenCV documentation
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. |
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. |
code |
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. |
Src1 First input array or image |
Src2 Second input array, image or constant |
Dst Output array or image that has the same size and number of channels as the input arrays or image. the depth is defined by src1/src2. |
Mask Mask - 8-bit single channel array or image, that specifies elements of the output image to be changed. |
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. |
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. |
code |
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. |
Dst out Output array or image that has the same size and number of channels as the input arrays or image. the depth is defined by src1/src2. |