-
Notifications
You must be signed in to change notification settings - Fork 27
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
Include text detection example #17
base: master
Are you sure you want to change the base?
Conversation
From the CI, it looks like some of these API's are quite recent and need to be included conditionally to make sure the package can still be built against older versions of libopencv... |
I could have a look if my limited c++ knowledge allows me to fix this. I wasn't really sure if this was something you wanted in opencv after all. Just let me know what you're thinking the next steps should be and I'll see what I can do. After all closing and ignoring the pr is always an option 😉 |
You would have to do a little bit of research or trial-and-error on when the given headers or API calls were introduced and wrap them in macros like so: Lines 63 to 65 in 976d4da
|
Fixed the build. Requires OpenCV 3.4.3 or newer and a build with DNN enabled |
But you're not setting |
It's defined in opencv.hpp. Note: Since the c++ part is mostly based on a sample file of a BSD licensed library required for linking with your package anyways, I did not add the BSD header to the package LICENSE.md. |
Oh sorry I didn't know |
Yeah, didn't realize it at first too, but you do not include it in r-backports on windows |
Yes, the version check is still required. OpenCV 3.4.1 introduced |
OK. I tried to run the example but I can't find the |
It's a tensorflow model provided via this dropbox link |
4883ccf
to
cee9805
Compare
Similar to the face detection I created R functions for text_detection, mostly copying around this sample code.
In a fun coding project I use it to obtain positions of text in images. These positions I can use to crop the larger image with
magick
to then usetesseract
socr()
on smaller pieces of the original image. (For more preprocessing amagick2opencv()
and vice versa function would be nice to have!) [Edit:] A conversion function was added in https://github.com/JanMarvin/opencv/tree/conversion