feat: ocr(android)#96
feat: ocr(android)#96NorbertKlockiewicz merged 2 commits into@norbertklockiewicz/ocr-implementationfrom
Conversation
|
I am wondering if I should add comments for functions similarly to iOS version |
| } catch (e: Exception) { | ||
| onComplete(1, e) | ||
| } |
There was a problem hiding this comment.
Can we tell from error which model failed?
There was a problem hiding this comment.
Without separate try catches for every model I don't think so
| if (rotatedConfidenceScore > confidenceScore) { | ||
| result = rotatedResult | ||
| confidenceScore = rotatedConfidenceScore | ||
| } |
There was a problem hiding this comment.
Shouldn't we skip processing if confidence is still below Constants.LOW_CONFIDENCE_THRESHOLD?
There was a problem hiding this comment.
Sometimes the confidence score is still low and the result is correct, we are returning a confidence score to user so I think we should leave handling those cases for him
|
|
||
| subArray.forEachIndexed { i, currentChar -> | ||
| if (i > 0) { | ||
| isNotRepeated.add(lastChar != currentChar) |
There was a problem hiding this comment.
Why are we ignoring repeated characters? if we haev text like strawberry does this ignore double r's?
There was a problem hiding this comment.
Simply the model is scanning the image column by column where column has width of I believe 1 pixel, so the same character will be scanned more than once, that's why we are ignoring repeated characters
<!-- Provide a concise and descriptive summary of the changes implemented in this PR. --> - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation update (improves or adds clarity to existing documentation) - [ ] iOS - [x] Android <!-- Provide step-by-step instructions on how to test your changes. Include setup details if necessary. --> <!-- Add screenshots here, if applicable --> <!-- Link related issues here using #issue-number --> - [x] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have updated the documentation accordingly - [x] My changes generate no new warnings <!-- Include any additional information, assumptions, or context that reviewers might need to understand this PR. -->
Description
Type of change
Tested on
Testing instructions
Screenshots
Related issues
Checklist
Additional notes