Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Setup ios text detector #627

Merged
merged 34 commits into from
Jun 22, 2018

Conversation

bparrishMines
Copy link
Contributor

No description provided.

Copy link
Contributor

@mravn-google mravn-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

- (NSMutableArray *)getElementData:(NSArray<FIRVisionTextElement *> *)elements {
NSMutableArray *elementDataArray = [NSMutableArray array];
[elements enumerateObjectsUsingBlock:^(FIRVisionTextElement *_Nonnull element, NSUInteger idx,
BOOL *_Nonnull stop) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to for loop?

NSMutableArray *lineDataArray = [NSMutableArray array];

[lines enumerateObjectsUsingBlock:^(FIRVisionTextLine *_Nonnull line, NSUInteger idx,
BOOL *_Nonnull stop) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to for loop?

text:(NSString *)text {
__block NSMutableArray<NSArray *> *points = [NSMutableArray array];
[cornerPoints enumerateObjectsUsingBlock:^(NSValue *_Nonnull point, NSUInteger idx,
BOOL *_Nonnull stop) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you are not using the idx, it may be simpler with just a for loop:

for (NSValue* point in cornerPoints) {
  ...
}

cornerPoints:block.cornerPoints
text:block.text]];
blockData[@"lines"] = [self getLineData:block.lines];
} else if ([feature isKindOfClass:[FIRVisionTextBlock class]]) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably meant [FIRVisionTextLine class] here.

@mravn-google
Copy link
Contributor

@bparrishMines There are a lot of commits here mentioning Dart and Android, yet this PR contains only iOS changes. Are you missing a rebase or some such?

@bparrishMines
Copy link
Contributor Author

@mravn-google This branch was branched off the android side PR. I think that is where all the extra commits are from

@bparrishMines bparrishMines merged commit cb59fc8 into flutter:master Jun 22, 2018
@bparrishMines bparrishMines deleted the ml_visioin_text_iOS branch June 22, 2018 23:12
@bparrishMines
Copy link
Contributor Author

Actually, I just understood what you meant about missing the rebase.

julianscheel pushed a commit to jusst-engineering/plugins that referenced this pull request Mar 11, 2020
* Initial 'fluter create' for Firebase ML Vision plugin

* Formatting

* More Formatting

* Import ordering

* Added android app to firebase

* Added ios app to firebase

* Added ml vision to android and ios

* WIP dart side of ml vision

* finish dart side of ml vision and text detector

* Added TextDetector tests

* Added some comments

* Finished comments

* Removed usused dependency

* Formatting and unused imports

* Changed variable name to restart WIP test

* Start of android text detection

* Added text recognition to android channel

* Create dart test app

* Added to test app

* Finished example ml vision app

* Formatting

* Fixed crash

* Add permssions

* Setup iOS side of text detector

* Formatting and comments

* More formattign

* More More Formatting

* For loops and a correction
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants