text-detector | application contains all code from my article | REST library
kandi X-RAY | text-detector Summary
kandi X-RAY | text-detector Summary
This application contains all the code from my article on the Text Detector API.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Detect text inside the View
- Initializes the activity
text-detector Key Features
text-detector Examples and Code Snippets
Community Discussions
Trending Discussions on text-detector
QUESTION
First, I used https://github.com/jeanpan/react-native-camera-roll-picker#readme to get an image from photo library, it returned a uri: ph://11A68DD6-A651-462D-BDAB-68FB853ED141/L0/001
Then, I used https://github.com/zsajjad/react-native-text-detector to get text from that image
It worked fine in android but it always returned false in iOS, and I found the following error in console log
NSURLConnection finished with error - code -1002
For more information, the image control can show that image correctly
Here is my source code : https://github.com/haison8x/react-native-test-ocr
Is there any problem with that URI or with application permission?
...ANSWER
Answered 2020-Jan-15 at 12:15Due to the sandbox policy of Apple https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AboutAppSandbox/AboutAppSandbox.html, your app cannot read the photo in gallery directly, it will encounter the error: NSURLConnection finished with error - code -1002.
Here is my approach:
- Use RNFS.copyAssetsFileIOS copy photo to temp file at your app documents
- Use react-native-text-detector to analyze that temp file
The full example is pushed to https://github.com/haison8x/react-native-test-ocr
QUESTION
I'm working on a Python project. One of the functionalities i need to create is to be able to detect whether an image has text. I do not need any kind of bounding box, I only need true or false, regardless the amount of text the image has. I've been following the steps here but, as all the links i managed to found, it eventually creates the bounding boxes.
I have two questions:
- Is there any text detection mecanism that i can use to detect text without all the overhead of the bounding box process?
- OpenCV uses a neural net to detect text which is an exteneral .PB file; i need to load it to use the nn. Is there any way to embed this file within the .py file? This would avoid having two files. The idea behind this is to be able to import the .py file and use it as a library, disregarding the .pb file (which is the model that detects text).
Thank you!
...ANSWER
Answered 2019-Dec-04 at 13:14Is there any text detection mecanism that i can use to detect text without all the overhead of the bounding box process?
The bounding boxes are the result of doing all the detection processing, and as such represent an intrinsic part of the process. If you don't care where the text is, you are free to ignore the resulting bounding boxes in your own code. But in order to detect whether there is text in the image, the algorithm (of whatever type) has to detect where the text is.
The DNN method used in the linked article may be overkill if you don't care about the results. You could always try some other text detection algorithms and try to profile them to find a less computationally expensive one for your application. There will always be tradeoffs.
OpenCV uses a neural net to detect text which is an exteneral .PB file; i need to load it to use the nn. Is there any way to embed this file within the .py file? This would avoid having two files. The idea behind this is to be able to import the .py file and use it as a library, disregarding the .pb file (which is the model that detects text).
Yes, you could embed the contents of the model .pb
file directly into your Python code as a buffer object, and then use the alternate model loading mechanism to read the model from a buffer:
QUESTION
I am working with Expo
, React Native
and I want to to be able to detect text from images. Is there an package i can work with to achieve this?
I am using Expo camera module
to snap the picture and supply the URI to the text detector
I have tried using react-native-text-detector but I am getting the error that the function detectFromUri is not defined. I have also tried with tesserect.js but it fails on import with "unable to resolve variable location".
ANSWER
Answered 2019-Apr-17 at 09:05Is your project created with expo-cli
?
If yes, Expo is not supporting OCR currently. There is a feature request on canny.io but you can't know for sure when it will become available. Your only choice is to use an OCR service like this one.Internet connectivity will be required.
If not, (and the project is created with react-native-cli
) you should be able to successfully use react-native-text-detector
. Just make sure you link the package correctly. Docs here
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install text-detector
You can use text-detector like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the text-detector component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page