hls::And


Synopsis


1. without mask:
template<int ROWS, int COLS, int SRC1_T, int SRC2_T, int DST_T>
void hls::And( hls::Mat<ROWS, COLS, SRC1_T>& src1,
               hls::Mat<ROWS, COLS, SRC2_T>& src2,
               hls::Mat<ROWS, COLS, DST_T>& dst );
2. with mask:
template<int ROWS, int COLS, int SRC1_T, int SRC2_T, int DST_T>
void hls::And( hls::Mat<ROWS, COLS, SRC1_T>& src1,
               hls::Mat<ROWS, COLS, SRC2_T>& src2,
               hls::Mat<ROWS, COLS, DST_T>& dst,
               hls::Mat<ROWS, COLS, HLS_8UC1>& mask,
               hls::Mat<ROWS, COLS, DST_T>& dst_ref );

Parameters

  • src1 – first input image.
  • src2 – second 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


Calculates the per-element bit-wise logical conjunction of two images src1 and src2 and returns the result as image dst.
If computes with mask:
And.png
Image data must be stored in src1 and src2(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 src1 and src2(if computes with mask, the data of maskand dst_ref will be also consumed), and filling the image data of dst.
src1 and src2 must have the same size and number of channels.dstand dst_refmust have the same size and number of channels as the inputs. mask must have the same size as the inputs.

OpenCV reference


cvAnd, cv::bitwise_and