googlesamples / googlesamples/mlkit
[Bug report] DigitalInkRecognition Writing Area size setting doesn't affect the recognition
- Dominant language
- Kotlin
- Stars
- 4.3k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
So I'm playing with the ios DigitalInkRecognition quickstart and I believe setting the Writing Area size doesn't make the desired affect on recognition.
What I've done to test it is shrunk the `drawnImage` and `recognizedImage` to 300x300 size. And passed that size as a context to the recognizer:
```Swift
recognizer.recognize(
ink: ink,
//HERE:
context: DigitalInkRecognitionContext(preContext: "", writingArea: WritingArea(width: 300.0, height: 300.0)),
completion: {
[unowned self, recognizedInk]
(result: DigitalInkRecognitionResult?, error: Error?) in
if let result = result, let candidate = result.candidates.first {
recognizedInk.text = candidate.text
var message = "Recognized: \(candidate.text), with writing area of 300x300"
self.delegate?.displayMessage(message: message)
}
```
Here is what I get:
1. Drawing lowercase 'o', getting a lowercase 'o': https://i.imgur.com/cv0Gx74.jpg
2. Drawing big, uppercase 'O', still getting a lowercase 'o': https://i.imgur.com/4VDAQy0.jpg
Maybe I'm misunderstanding how that should work. If so could you please tell me how can I get an uppercased 'O' in this example?
Thank you!
P.S. The page from docs: https://developers.google.com/ml-kit/vision/digital-ink-recognition/ios#writing-area
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.