capacitor-mlkit
capacitor-mlkit copied to clipboard
feat(barcode-scanning): support `cornerPoints` in `readBarcodesFromImage(...)`
Plugin(s)
- [X] Barcode Scanning
- [ ] Translation
Did you test the latest version?
- [X] I use the latest version
Platform(s)
- [X] Android
- [ ] iOS
- [ ] Web
Current behavior
cornerPoints is empty
Expected behavior
cornerPoints should have points
Reproduction
https://github.com/tigohenryschultz/ionic-cap-ml-barcode-test
Steps to reproduce
- Go to the ML Kit tab
- Click take a picture
- Missing points data
Code is in TgMLKitBarcodes.vue
Other information
3
:
bytes
:
(9) [52, 45, 50, 68, 48, 55, 69, 50, 84]
cornerPoints
:
[]
displayValue
:
"4-2D07E2T"
format
:
"QR_CODE"
rawValue
:
"4-2D07E2T"
valueType
:
"TEXT"
[[Prototype]]
:
Object
4
:
{bytes: Array(9), cornerPoints: Array(0), displayValue: '4-2D0775R', format: 'QR_CODE', rawValue: '4-2D0775R', …}
5
:
{bytes: Array(9), cornerPoints: Array(0), displayValue: '4-2D0765X', format: 'QR_CODE', rawValue: '4-2D0765X', …}
6
:
bytes
:
(9) [52, 45, 50, 67, 57, 68, 56, 53, 77]
cornerPoints
:
Array(0)
length
:
0
[[Prototype]]
:
Array(0)
displayValue
:
"4-2C9D85M"
format
:
"QR_CODE"
rawValue
:
"4-2C9D85M"
valueType
:
"TEXT"
[[Prototype]]
:
Object
7
:
{bytes: Array(9), cornerPoints: Array(0), displayValue: '4-2D07EFY', format: 'QR_CODE', rawValue: '4-2D07EFY', …}
8
:
bytes
:
(9) [52, 45, 50, 67, 57, 67, 68, 56, 87]
cornerPoints
:
[]
displayValue
:
"4-2C9CD8W"
format
:
"QR_CODE"
rawValue
:
"4-2C9CD8W"
valueType
:
"TEXT"
[[Prototype]]
:
Object
Capacitor doctor
Latest Dependencies:
@capacitor/cli: 5.0.4 @capacitor/core: 5.0.4 @capacitor/android: 5.0.4 @capacitor/ios: 5.0.4
Installed Dependencies:
@capacitor/cli: 5.0.3 @capacitor/core: 5.0.3 @capacitor/android: 5.0.3 @capacitor/ios: 5.0.3
Before submitting
- [X] I understand that incomplete issues (e.g. without reproduction) are closed.
Adding this debug code I see getBoundingBox has some information:
Thank you for reporting this. I will take a closer look the next days.
The readBarcodesFromImage(...) method does not yet support the calculation of cornerPoints. I have now documented this (see here) and converted the issue into a feature request.
PRs are welcome.
@ebarooni Feel free to work on this issue. There is already a PR which you can use as inspiration: https://github.com/capawesome-team/capacitor-mlkit/pull/100
Closed by #225