From 9dd83a3fb4a5ec96d7e4080cbdf867196d0688c1 Mon Sep 17 00:00:00 2001 From: BlueMatthew Date: Mon, 4 Dec 2023 11:25:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/camera2/ndkcamera.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/cpp/camera2/ndkcamera.cpp b/app/src/main/cpp/camera2/ndkcamera.cpp index 1b41004d..4f22f0e0 100644 --- a/app/src/main/cpp/camera2/ndkcamera.cpp +++ b/app/src/main/cpp/camera2/ndkcamera.cpp @@ -633,20 +633,18 @@ void NdkCamera::on_image(const unsigned char* nv21, int nv21_width, int nv21_hei cv::Mat nv21_rotated(h + h / 2, w, CV_8UC1); ncnn::kanna_rotate_yuv420sp(nv21, nv21_width, nv21_height, nv21_rotated.data, w, h, rotate_type); +#ifdef _DEBUG if (nv21_rotated.empty()) { int aa = 0; } +#endif + // nv21_rotated to rgb cv::Mat rgb(h, w, CV_8UC3); // ncnn::yuv420sp2rgb(nv21_rotated.data, w, h, rgb.data); ncnn::yuv420sp2rgb_nv12(nv21_rotated.data, w, h, rgb.data); - if (rgb.empty()) - { - int aa = 0; - - } // cv::Mat rgb(h, w, CV_8UC3); // ncnn::yuv420sp2rgb_nv12(nv21, w, h, rgb.data);