From cdb85c682f2531dcb55c0de8691fe981b4fb401a Mon Sep 17 00:00:00 2001 From: grabbit Date: Sat, 5 Apr 2025 13:49:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BD=8E=E4=BA=8Eopencv=204.11.0?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=B8=8D=E5=AD=98=E5=9C=A8ALGO=5FHINT=5FAPPR?= =?UTF-8?q?OX=E5=AF=BC=E8=87=B4=E7=BC=96=E8=AF=91=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/opencv_compat.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/opencv_compat.rs b/src/utils/opencv_compat.rs index b914bdf..bdaea8b 100644 --- a/src/utils/opencv_compat.rs +++ b/src/utils/opencv_compat.rs @@ -1,6 +1,5 @@ use anyhow::Result; use opencv::{core, imgproc}; -use opencv::core::AlgorithmHint::ALGO_HINT_APPROX; use opencv::prelude::*; /// Convert an image from one color space to another, with compatibility across OpenCV versions @@ -23,7 +22,7 @@ pub fn convert_color( dst_cn: i32, ) -> Result<(), opencv::Error> { // OpenCV 4.11+ version with ALGO_HINT_APPROX parameter - imgproc::cvt_color(src, dst, code, dst_cn, ALGO_HINT_APPROX) + imgproc::cvt_color(src, dst, code, dst_cn, opencv::core::AlgorithmHint::ALGO_HINT_APPROX) } /// Convert an image from one color space to another, with compatibility across OpenCV versions