@mleonard9/vin-scanner 1.4.6 → 1.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -51,7 +51,8 @@ export function VinScannerExample(): JSX.Element {
|
|
|
51
51
|
|
|
52
52
|
const options = useMemo(
|
|
53
53
|
() => ({
|
|
54
|
-
|
|
54
|
+
// Include QR for corner codes on auction tags
|
|
55
|
+
barcode: { formats: ['code-39', 'code-128', 'pdf-417', 'qr'] },
|
|
55
56
|
onResult: (candidates, event) => {
|
|
56
57
|
setResults(candidates);
|
|
57
58
|
console.log(`Scan took ${event.duration}ms`);
|
|
@@ -340,7 +341,7 @@ Phase 1 optimizations dramatically improve scanning performance through native R
|
|
|
340
341
|
```tsx
|
|
341
342
|
const { frameProcessor } = useVinScanner({
|
|
342
343
|
detection: {
|
|
343
|
-
// Focus on center 50% of frame
|
|
344
|
+
// Focus on center 50% of frame (set null to cover full frame / corner QR)
|
|
344
345
|
scanRegion: { x: 0.25, y: 0.25, width: 0.5, height: 0.5 },
|
|
345
346
|
textScanInterval: 2,
|
|
346
347
|
},
|
package/android/src/main/java/com/visioncamerabarcodescanner/VisionCameraBarcodeScannerModule.kt
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
package com.visioncamerabarcodescanner
|
|
2
2
|
|
|
3
3
|
import android.media.Image
|
|
4
|
+
import android.util.Log
|
|
4
5
|
import com.google.android.gms.tasks.Task
|
|
5
6
|
import com.google.android.gms.tasks.Tasks
|
|
6
7
|
import com.google.mlkit.vision.barcode.BarcodeScannerOptions
|
|
@@ -182,7 +183,10 @@ class VisionCameraBarcodeScannerModule(
|
|
|
182
183
|
}
|
|
183
184
|
response
|
|
184
185
|
} catch (e: Exception) {
|
|
185
|
-
|
|
186
|
+
Log.e("vinScannerBarcode", "Error processing barcode scanner", e)
|
|
187
|
+
val response = HashMap<String, Any?>()
|
|
188
|
+
response["detections"] = emptyList<Map<String, Any?>>()
|
|
189
|
+
return response
|
|
186
190
|
}
|
|
187
191
|
}
|
|
188
192
|
}
|
package/android/src/main/java/com/visioncameratextrecognition/VisionCameraTextRecognitionModule.kt
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
package com.visioncameratextrecognition
|
|
2
2
|
|
|
3
3
|
import android.media.Image
|
|
4
|
+
import android.util.Log
|
|
4
5
|
import com.google.android.gms.tasks.Task
|
|
5
6
|
import com.google.android.gms.tasks.Tasks
|
|
6
7
|
import com.google.mlkit.vision.common.InputImage
|
|
@@ -224,7 +225,10 @@ class VisionCameraTextRecognitionModule(
|
|
|
224
225
|
}
|
|
225
226
|
return response
|
|
226
227
|
} catch (e: Exception) {
|
|
227
|
-
|
|
228
|
+
Log.e("vinScannerText", "Error processing text recognition", e)
|
|
229
|
+
val response = HashMap<String, Any?>()
|
|
230
|
+
response["detections"] = ArrayList<Map<String, Any?>>()
|
|
231
|
+
return response
|
|
228
232
|
}
|
|
229
233
|
}
|
|
230
234
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mleonard9/vin-scanner",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"description": "High-performance VIN scanner for React Native Vision Camera powered by Google ML Kit barcode + text recognition.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|