hls::AddWeighted


Synopsis

template<int ROWS, int COLS, int SRC1_T, int SRC2_T, int DST_T, typename P_T>
void hls::AddWeighted( hls::Mat<ROWS, COLS, SRC1_T>& src1,
                       P_T alpha,
                       hls::Mat<ROWS, COLS, SRC2_T>& src2,
                       P_T beta,
                       P_T gamma,
                       hls::Mat<ROWS, COLS, DST_T>& dst );

Parameters

  • src1 – first input image.
  • alpha – weight for the first image elements.
  • src2 – second input image.
  • beta – weight for the second image elements.
  • gamma – scalar added to each sum.
  • dst – the output image

Description


Computes the weighted per-element sum of two image src1 andsrc2, and save the result in dst.
The weighted sum computes as follows:
AddWeighted.png
Image data must be stored in src1 and src2, the image data of dst must be empty before invocations. Invoking this function will consume the data in src1 and src2, and filling the image data of dst. The three parameters alpha, beta and gamma must have the same datatypes.
src1 and src2 must have the same size and number of channels.dstmust have the same size and number of channels as the inputs.

OpenCV reference


cvAddWeighted, cv::addWeighted