fix: use cvt_color_def
This commit is contained in:
@@ -104,11 +104,10 @@ fn frame_to_buffer(
|
|||||||
) -> opencv::Result<SharedPixelBuffer<Rgb8Pixel>> {
|
) -> opencv::Result<SharedPixelBuffer<Rgb8Pixel>> {
|
||||||
let mut rgb = Mat::default();
|
let mut rgb = Mat::default();
|
||||||
|
|
||||||
imgproc::cvt_color(
|
imgproc::cvt_color_def(
|
||||||
frame,
|
frame,
|
||||||
&mut rgb,
|
&mut rgb,
|
||||||
imgproc::COLOR_BGR2RGB,
|
imgproc::COLOR_BGR2RGB,
|
||||||
0,
|
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
// Ensure the bytes are contiguous.
|
// Ensure the bytes are contiguous.
|
||||||
|
|||||||
Reference in New Issue
Block a user