cv-rs
cv-rs copied to clipboard
Make text module optional
The text module, contained within opencv_contrib should be an optional part of the build for cv-rs because the current homebrew opencv does not include opencv_contrib/text by default.
There is a workaround for the problem (with brew --version
: Homebrew/homebrew-core (git revision 530af; last commit 2018-05-20))
The current homebrew install of OpenCV does not include the text module by default. To make cv-rs build, I had to brew edit opencv
and on line 62 of the formula set -DBUILD_opencv_text=ON
. Then, I had to brew install --build-from-source opencv
. With the change, homebrew builds the non-default text module, which in turn enables cv-rs to build successfully.
Without this workaround, the cv-rs build fails part way through with an error that it cannot find opencv2/text/ocr.hpp (which is part of opencv_contrib/text).
Hi @blucia0a
Do you have some vision of how it could be implemented? I'm affraid it leads to a big fragmentation, "mac edition"/"windows edition"/"fedora edition"/...
If you have some clear way to achieve that feel free to write it or even create a PR.
@blucia0a Thanks! You saved me.
I really suggest that add this solution into README.md.
@Pzixel This issue seems to have already been dealt with and can be closed.