Skip to content

Commit a8d02df

Browse files
author
bghira
committed
opencv 4.12 compat
1 parent 7a39e25 commit a8d02df

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/opencv_ops.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,13 @@ impl OpenCVBatchProcessor {
180180
)?;
181181

182182
#[cfg(not(target_os = "macos"))]
183-
cvt_color(&src_mat, &mut gray_mat, COLOR_RGB2GRAY, 0)?;
183+
cvt_color(
184+
&src_mat,
185+
&mut gray_mat,
186+
COLOR_RGB2GRAY,
187+
0,
188+
opencv::core::AlgorithmHint::ALGO_HINT_DEFAULT,
189+
)?;
184190

185191
// Calculate mean (luminance)
186192
let mean_scalar = opencv::core::mean(&gray_mat, &opencv::core::no_array())?;

src/true_batch_ops.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,13 @@ impl TrueBatchProcessor {
282282
opencv::core::AlgorithmHint::ALGO_HINT_DEFAULT,
283283
)?;
284284
#[cfg(not(target_os = "macos"))]
285-
cvt_color(&src_mats[i], &mut dst_mat, opencv_code, 0)?;
285+
cvt_color(
286+
&src_mats[i],
287+
&mut dst_mat,
288+
opencv_code,
289+
0,
290+
opencv::core::AlgorithmHint::ALGO_HINT_DEFAULT,
291+
)?;
286292

287293
results.push(result);
288294
}

0 commit comments

Comments
 (0)