We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected] for the project I'm working on.
[email protected]
adding top and left to bounding frame return
Here is the diff that solved my problem:
diff --git a/node_modules/vision-camera-ocr/android/src/main/java/com/visioncameraocr/OCRFrameProcessorPlugin.kt b/node_modules/vision-camera-ocr/android/src/main/java/com/visioncameraocr/OCRFrameProcessorPlugin.kt index 8ae6279..1e22c03 100644 --- a/node_modules/vision-camera-ocr/android/src/main/java/com/visioncameraocr/OCRFrameProcessorPlugin.kt +++ b/node_modules/vision-camera-ocr/android/src/main/java/com/visioncameraocr/OCRFrameProcessorPlugin.kt @@ -88,6 +88,8 @@ class OCRFrameProcessorPlugin: FrameProcessorPlugin("scanOCR") { if (boundingBox != null) { frame.putDouble("x", boundingBox.exactCenterX().toDouble()) frame.putDouble("y", boundingBox.exactCenterY().toDouble()) + frame.putInt("left", boundingBox.left) + frame.putInt("top", boundingBox.top) frame.putInt("width", boundingBox.width()) frame.putInt("height", boundingBox.height()) frame.putInt("boundingCenterX", boundingBox.centerX()) diff --git a/node_modules/vision-camera-ocr/lib/typescript/index.d.ts b/node_modules/vision-camera-ocr/lib/typescript/index.d.ts index 47f1816..a3b6c3f 100644 --- a/node_modules/vision-camera-ocr/lib/typescript/index.d.ts +++ b/node_modules/vision-camera-ocr/lib/typescript/index.d.ts @@ -2,6 +2,8 @@ import type { Frame } from 'react-native-vision-camera'; declare type BoundingFrame = { x: number; y: number; + top: number; + left: number; width: number; height: number; boundingCenterX: number; @@ -41,4 +43,5 @@ export declare type OCRFrame = { * Scans OCR. */ export declare function scanOCR(frame: Frame): OCRFrame; -export {}; +export { }; + diff --git a/node_modules/vision-camera-ocr/src/index.tsx b/node_modules/vision-camera-ocr/src/index.tsx index b4eeb76..608828a 100644 --- a/node_modules/vision-camera-ocr/src/index.tsx +++ b/node_modules/vision-camera-ocr/src/index.tsx @@ -4,6 +4,8 @@ import type { Frame } from 'react-native-vision-camera'; type BoundingFrame = { x: number; y: number; + top: number; + left: number; width: number; height: number; boundingCenterX: number;
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
[email protected]
for the project I'm working on.adding top and left to bounding frame return
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: