From 7fbffb2930be25a800e779da7fc44912fcc12696 Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 24 Feb 2025 19:18:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=94=99=E8=AF=AF=E4=BF=9D?= =?UTF-8?q?=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 025930fa..c389b26b 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -2171,6 +2171,10 @@ void visualize(const char* filename, const ncnn::Mat& m) void DrawOutlineText(cv::Ptr ft2, cv::Mat& mat, const std::string& str, cv::Point startPoint, int fontSize, cv::Scalar clr, int thickness) { + if (mat.empty()) + { + return; + } std::vector lines = split(str, "\n"); int lineHeight = 0; cv::Point pt = startPoint;