Closed tubo28 closed 5 years ago
Brew install won't work because cv-rs is currently depends on several custom modules (such as text
). It won't work with brew vesion that lacks them.
You can help make it building on brew version by enabling custom features (such as text
, tracking
, ...) and creating a PR with them. Unfortunately I don't have mac so I'm not aware which modules are included. It shouldn't take a lot of time, but it would help other users.
If you don't, then you have to use built-in script .ci/travis_build_opencv.sh
to build the correct version of opencv with all required dependencies. But I do believe it's the worse alternative.
It works by removing some lines and files related to OCR feature, but I don't have enough skills to make a build configuration in right way and the PR 😇 I use that version of this crate for this time...
Juse use cfg(text)
instead of removing and everything would work.
I tried to build a sample program after
brew install opencv
on Mac OS X, but following error occurred. Ascargo:warning=native/text.h:6:10: fatal error: 'opencv2/text/ocr.hpp' file not found
shows, there is notext
directory in/usr/local/include/opencv2
.Please tell me how to fix it.
src/main.rs
:Build result:
OpenCV Environment: