MCPcopy Create free account
hub / github.com/ARM-software/armnn / PadFrame

Function PadFrame

samples/ObjectDetection/src/ImageUtils.cpp:106–120  ·  view source on GitHub ↗

Pad a frame with zeros (add rows and columns to the end) */

Source from the content-addressed store, hash-verified

104
105/** Pad a frame with zeros (add rows and columns to the end) */
106void 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
122void ResizeWithPad(const cv::Mat& frame, cv::Mat& dest, cv::Mat& cache, const common::Size& destSize)
123{

Callers 1

ResizeWithPadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected