From 555e02f97580f548d2d58966c3e27f0af0e3ecfb Mon Sep 17 00:00:00 2001 From: 88madri Date: Tue, 23 Oct 2018 08:21:24 +0200 Subject: [PATCH 1/2] Update trt_utils.h --- sources/lib/trt_utils.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/lib/trt_utils.h b/sources/lib/trt_utils.h index cec1612..af7654c 100644 --- a/sources/lib/trt_utils.h +++ b/sources/lib/trt_utils.h @@ -28,7 +28,6 @@ SOFTWARE. #define __TRT_UTILS_H__ /* OpenCV headers */ -#include #include #include #include From 4bcf06706b0f0d43847a9f9e886b3d55c485e2ac Mon Sep 17 00:00:00 2001 From: 88madri Date: Tue, 23 Oct 2018 08:22:56 +0200 Subject: [PATCH 2/2] Update ds_image.cpp --- sources/lib/ds_image.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/lib/ds_image.cpp b/sources/lib/ds_image.cpp index f94dc5e..b83b9a9 100644 --- a/sources/lib/ds_image.cpp +++ b/sources/lib/ds_image.cpp @@ -46,7 +46,7 @@ DsImage::DsImage(const std::string& path, const int& inputH, const int& inputW) m_ImageName() { m_ImageName = std::experimental::filesystem::path(path).stem().string(); - m_OrigImage = cv::imread(path, CV_LOAD_IMAGE_COLOR); + m_OrigImage = cv::imread(path, cv::IMREAD_COLOR); if (!m_OrigImage.data || m_OrigImage.cols <= 0 || m_OrigImage.rows <= 0) { @@ -91,7 +91,7 @@ DsImage::DsImage(const std::string& path, const int& inputH, const int& inputW) m_LetterboxImage.convertTo(m_LetterboxImage, CV_32FC3, 1 / 255.0); cv::threshold(m_LetterboxImage, m_LetterboxImage, 1.0, 1.0, cv::ThresholdTypes::THRESH_TRUNC); // converting to RGB - cv::cvtColor(m_LetterboxImage, m_LetterboxImage, CV_BGR2RGB); + cv::cvtColor(m_LetterboxImage, m_LetterboxImage, cv::COLOR_BGR2RGB); } void DsImage::addBBox(BBoxInfo box, const std::string& labelName) @@ -109,7 +109,7 @@ void DsImage::addBBox(BBoxInfo box, const std::string& labelName) = cv::getTextSize(labelName, cv::FONT_HERSHEY_COMPLEX_SMALL, 0.5, 1, nullptr); cv::rectangle(m_MarkedImage, cv::Rect(x, y, tsize.width + 3, tsize.height + 4), color, -1); cv::putText(m_MarkedImage, labelName.c_str(), cv::Point(x, y + tsize.height), - cv::FONT_HERSHEY_COMPLEX_SMALL, 0.5, cv::Scalar(255, 255, 255), 1, CV_AA); + cv::FONT_HERSHEY_COMPLEX_SMALL, 0.5, cv::Scalar(255, 255, 255), 1, cv::LINE_AA); } void DsImage::showImage() const @@ -122,4 +122,4 @@ void DsImage::showImage() const void DsImage::saveImageJPEG(const std::string& dirPath) const { cv::imwrite(dirPath + m_ImageName + ".jpeg", m_MarkedImage); -} \ No newline at end of file +}