init commit

This commit is contained in:
2024-07-13 13:15:28 +00:00
commit 157639e9e3
14 changed files with 1903 additions and 0 deletions

20
include/utils/augment.h Normal file
View File

@ -0,0 +1,20 @@
#pragma once
#include <opencv2/core/types.hpp>
void letterbox(const cv::Mat& image,
cv::Mat& outImage,
const cv::Size& newShape = cv::Size(640, 640),
cv::Scalar_<double> color = cv::Scalar(), bool auto_ = true,
bool scaleFill = false,
bool scaleUp = true,
int stride = 32
);
cv::Mat scale_image(const cv::Mat& resized_mask, const cv::Size& im0_shape, const std::pair<float,
cv::Point2f>& ratio_pad = std::make_pair(-1.0f, cv::Point2f(-1.0f, -1.0f)));
void scale_image2(
cv::Mat& scaled_mask, const cv::Mat& resized_mask, const cv::Size& im0_shape,
const std::pair<float, cv::Point2f>& ratio_pad = std::make_pair(-1.0f, cv::Point2f(-1.0f, -1.0f))
);