benchmark_app bugfix for filling input (#8433)

Benchmark_app created mismatching buffer because of transposition of
width/height. Input was not fed into network in case of non-square form.
This commit is contained in:
Mingyu Kim 2021-11-10 19:19:31 +09:00 committed by GitHub
parent 6a89eb2844
commit 9b52f64445
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ std::shared_ptr<unsigned char> OCVReader::getData(size_t width = 0, size_t heigh
size_t size = width * height * img.channels();
_data.reset(new unsigned char[size], std::default_delete<unsigned char[]>());
cv::Mat resized(width, height, img.type(), _data.get());
cv::Mat resized(cv::Size(width, height), img.type(), _data.get());
if (width != img.cols || height != img.rows) {
slog::warn << "Image is resized from (" << img.cols << ", " << img.rows << ") to (" << width << ", " << height