-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Setup ios text detector #627
Setup ios text detector #627
Conversation
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.
LGTM
- (NSMutableArray *)getElementData:(NSArray<FIRVisionTextElement *> *)elements { | ||
NSMutableArray *elementDataArray = [NSMutableArray array]; | ||
[elements enumerateObjectsUsingBlock:^(FIRVisionTextElement *_Nonnull element, NSUInteger idx, | ||
BOOL *_Nonnull stop) { |
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.
Change to for
loop?
NSMutableArray *lineDataArray = [NSMutableArray array]; | ||
|
||
[lines enumerateObjectsUsingBlock:^(FIRVisionTextLine *_Nonnull line, NSUInteger idx, | ||
BOOL *_Nonnull stop) { |
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.
Change to for
loop?
text:(NSString *)text { | ||
__block NSMutableArray<NSArray *> *points = [NSMutableArray array]; | ||
[cornerPoints enumerateObjectsUsingBlock:^(NSValue *_Nonnull point, NSUInteger idx, | ||
BOOL *_Nonnull stop) { |
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.
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]]) { |
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.
You probably meant [FIRVisionTextLine class]
here.
@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? |
@mravn-google This branch was branched off the android side PR. I think that is where all the extra commits are from |
Actually, I just understood what you meant about missing the rebase. |
* 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
No description provided.