cv-rs icon indicating copy to clipboard operation
cv-rs copied to clipboard

Make text module optional

Open blucia0a opened this issue 6 years ago • 3 comments

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).

blucia0a avatar May 21 '18 18:05 blucia0a

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.

Pzixel avatar May 24 '18 20:05 Pzixel

@blucia0a Thanks! You saved me.

I really suggest that add this solution into README.md.

kiruto avatar Jun 06 '18 02:06 kiruto

@Pzixel This issue seems to have already been dealt with and can be closed.

vadixidav avatar Apr 06 '19 01:04 vadixidav