-
-
Notifications
You must be signed in to change notification settings - Fork 177
Closed
Description
// gray_image_slice is slice &[u8]
let gray_image = image::GrayImage::from_raw(240, 360, gray_image_slice.to_vec()).unwrap();
// gray_image.save(&"gray_image.png");
let mut contours_cv = VectorOfVectorOfPoint::new();
imgproc::find_contours(
&gray_image,
&mut contours_cv,
imgproc::RETR_EXTERNAL,
imgproc::CHAIN_APPROX_SIMPLE,
core::Point::new(0, 0),
).unwrap();
The following error occurred when compiling:

The gray_image is type of ImageBuffer, but imgproc::find_contours need ToInputArray, I have no idea how to convert ImageBuffer to ToInputArray format, help please.
Metadata
Metadata
Assignees
Labels
No labels