The function xf::cv::absDiff computes the absolute difference between each individual pixels of an xf::cv::Mat and a cv::Mat, and returns the difference values in a cv::Mat.
API Syntax
template <int PTYPE, int ROWS, int COLS, int NPC>
void absDiff(cv::Mat &cv_img, xf::cv::Mat<PTYPE, ROWS, COLS, NPC>& xf_img, cv::Mat &diff_img )
Parameter Descriptions
The table below describes the template and the function parameters.
| Parameter | Description |
|---|---|
| PTYPE | Input pixel type |
| ROWS | Maximum height of the image to be read |
| COLS | Maximum width of the image to be read |
| NPC | Number of pixels to be processed per cycle; possible options are XF_NPPC1, XF_NPPC4, and XF_NPPC8 for 1-pixel, 4-pixel, and 8-pixel parallel operations respectively. |
| cv_img | cv::Mat array to be compared |
| xf_img | xf::cv::Mat array to be compared |
| diff_img | Output difference image(cv::Mat) |