mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
refactor: use MaaUtils instead of Utils (#14579)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
#include "VisionHelper.h"
|
||||
|
||||
#include "Utils/NoWarningCV.h"
|
||||
#include "MaaUtils/NoWarningCV.hpp"
|
||||
|
||||
#include "Assistant.h"
|
||||
#include "InstHelper.h"
|
||||
#include "Utils/ImageIo.hpp"
|
||||
#include "MaaUtils/ImageIo.h"
|
||||
#include "MaaUtils/Time.hpp"
|
||||
#include "Utils/Logger.hpp"
|
||||
#include "Utils/StringMisc.hpp"
|
||||
#include "Utils/Time.hpp"
|
||||
|
||||
using namespace asst;
|
||||
|
||||
@@ -131,13 +131,13 @@ cv::Mat asst::VisionHelper::create_mask(const cv::Mat& image, const cv::Rect& ro
|
||||
|
||||
bool VisionHelper::save_img(const std::filesystem::path& relative_dir)
|
||||
{
|
||||
std::string stem = utils::format_now_for_filename();
|
||||
std::string stem = MAA_NS::format_now_for_filename();
|
||||
auto relative_path = relative_dir / (stem + "_raw.png");
|
||||
Log.trace("Save image", relative_path);
|
||||
bool ret = imwrite(relative_path, m_image);
|
||||
bool ret = MAA_NS::imwrite(relative_path, m_image);
|
||||
|
||||
#ifdef ASST_DEBUG
|
||||
imwrite(relative_dir / (stem + "_draw.png"), m_image_draw);
|
||||
MAA_NS::imwrite(relative_dir / (stem + "_draw.png"), m_image_draw);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user