-
Notifications
You must be signed in to change notification settings - Fork 779
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
feat: Add bitmap to input image for text recognition #752
feat: Add bitmap to input image for text recognition #752
Conversation
@fbernaly I need the commons package to be updated as well, this is causing a failed check. How can I get this working? |
@feinstein: this is a lot of work! Thanks for the contribution. I will take a look. |
@@ -122,7 +122,29 @@ dependencies { | |||
Create an instance of `InputImage` as explained [here](https://github.com/flutter-ml/google_ml_kit_flutter/blob/master/packages/google_mlkit_commons#creating-an-inputimage). | |||
|
|||
```dart | |||
final InputImage inputImage; | |||
// From a file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1,3 +1,8 @@ | |||
## 0.15.0 | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discard this change
@@ -1,6 +1,6 @@ | |||
name: google_mlkit_text_recognition | |||
description: A Flutter plugin to use Google's ML Kit Text Recognition to recognize text in any Chinese, Devanagari, Japanese, Korean and Latin character set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discard changes to this file
@feinstein : I merged your code to a test branch before merging it to develop because I want to play with it before merging it to develop. The analyzer is failing because first we need to push version |
Closes #753.
In this PR I am adding the capability to extract text from a bitmap. This was mentioned in the Android ML Kit docs, but not in the iOS ones.
I have tested this in both Android and iOS and supplied an example case too.
This is important to me because I am using the
camera
package, but I am manipulating the image and I want to recognise text in only a portion of the image, so in order to make this I am capturing the bitmap image from the widget and cropping it, before sending it to the text recogniser.This simplifies also how we deal with images from the camera, as there are compatibility issues with the camera image formats for Android and iOS, with many open issues, so this can be used as a workaround.