Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newest opencv-rs breaks crate #21

Open
BrettHemes opened this issue Oct 9, 2024 · 1 comment
Open

Newest opencv-rs breaks crate #21

BrettHemes opened this issue Oct 9, 2024 · 1 comment

Comments

@BrettHemes
Copy link

The new version(s) of opencv-rs make a fundamental change and add a BoxedRef return type to capture the lifetimes of the underlying Mat data. These new return values result in errors for some conversions within the crate when updating via the instructions in the readme.

This crate is super helpful and an update would be very much appreciated.

Additionally, do you have any comments on the future of the crate? Can we expect routine updates, or is it more-or-less abandoned.
If the latter, we will (sadly) look into other options for our codebase.

@BrettHemes
Copy link
Author

BrettHemes commented Oct 10, 2024

I think the fix might be as simple as adding a try_clone()? to the end of each line that makes a Mat from a slice. This will make an explicit copy of the slice and return a new Mat proper with the (now owned) data (vs. a BoxedRef<Mat>). It makes a deep copy, but I believe this is the intended/expected behavior of the crate in general anyway?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant