Pad a frame with zeros (add rows and columns to the end) */
| 104 | |
| 105 | /** Pad a frame with zeros (add rows and columns to the end) */ |
| 106 | void PadFrame(const cv::Mat& src, cv::Mat& dest, const int bottom, const int right) |
| 107 | { |
| 108 | if(&dest != &src) |
| 109 | { |
| 110 | cv::copyMakeBorder(src, dest, 0, bottom, 0, right, cv::BORDER_CONSTANT); |
| 111 | } |
| 112 | else |
| 113 | { |
| 114 | const std::string warningMessage |
| 115 | { |
| 116 | "Pad was not performed because destination frame references the source frame." |
| 117 | }; |
| 118 | ARMNN_LOG(warning) << warningMessage; |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | void ResizeWithPad(const cv::Mat& frame, cv::Mat& dest, cv::Mat& cache, const common::Size& destSize) |
| 123 | { |