hls::SubS


Synopsis


1. without mask:
template<int ROWS, int COLS, int SRC_T, typename _T, int DST_T>
void hls::SubS( hls::Mat<ROWS, COLS, SRC_T>& src,
                hls::Scalar<HLS_MAT_CN(SRC_T), _T>& scl,
                hls::Mat<ROWS, COLS, DST_T>& dst );
2. with mask:
template<int ROWS, int COLS, int SRC_T, typename _T, int DST_T>
void hls::SubS( hls::Mat<ROWS, COLS, SRC_T>& src,
                hls::Scalar<HLS_MAT_CN(SRC_T), _T>& scl,
                hls::Mat<ROWS, COLS, DST_T>& dst,
                hls::Mat<ROWS, COLS, HLS_8UC1>& mask,
                hls::Mat<ROWS, COLS, DST_T>& dst_ref );

Parameters

  • src – the input image.
  • scl – the input scalar.
  • dst – the output image.
  • mask – the operation mask, 8-bit single channel image, that specifies elements of the dst image to be computed.
  • dst_ref – the reference image, that stores the elements for output image when mask(I) = 0.

Description


Computes the differences between elements of image srcand scalar value scl, and save the result in dst.
If computes with mask:
SubS.png
Image data must be stored in src(if computes with mask, mask and dst_ref must have data stored), and the image data of dst must be empty before invocations. Invoking this function will consume the data in src(if computes with mask, the data of mask and dst_ref will be also consumed), and filling the image data of dst.
src and scl must have the same number of channels. ds tand dst_ref must have the same size and number of channels as src. mask must have the same size as the src.

OpenCV reference


cvSubS, cv::subtract