hls::AddS


Synopsis


1. without mask:
template<int ROWS, int COLS, int SRC_T, typename _T, int DST_T>
void hls::AddS( 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::AddS( 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 per-element sum of an image src and a scalar scl, and save the result in dst.
If computes with mask:
AddS.png
Image data must be stored in src(if computes with mask, maskand 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 maskand dst_ref will be also consumed), and filling the image data of dst.
src and scl must have the same number of channels.dstand dst_refmust have the same size and number of channels as src. mask must have the same size as the src.

OpenCV reference


cvAddS, cv::add