Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
vision-camera-ocr-v3
Advanced tools
VisionCamera Frame Processor Plugin to provide OCR support
This is just for convenient updates from original repo vision-camera-ocr
As the repo vision-camera-ocr seems not work with the v3 vision-camera, so I update it here
A VisionCamera Frame Processor Plugin to preform text detection on images using MLKit Vision Text Recognition.
yarn add vision-camera-ocr
cd ios && pod install
Add the plugin to your babel.config.js
:
module.exports = {
plugins: [
[
'react-native-reanimated/plugin',
{
globals: ['__scanOCR'],
},
],
// ...
Note: You have to restart metro-bundler for changes in the
babel.config.js
file to take effect.
import { labelImage } from "vision-camera-image-labeler";
// ...
const frameProcessor = useFrameProcessor((frame) => {
'worklet';
const scannedOcr = scanOCR(frame);
}, []);
scanOCR(frame)
returns an OCRFrame
with the following data shape. See the example for how to use this in your app.
OCRFrame = {
result: {
text: string, // Raw result text
blocks: Block[], // Each recognized element broken into blocks
;
};
The text object closely resembles the object documented in the MLKit documents. https://developers.google.com/ml-kit/vision/text-recognition#text_structure
The Text Recognizer segments text into blocks, lines, and elements. Roughly speaking:
a Block is a contiguous set of text lines, such as a paragraph or column,
a Line is a contiguous set of words on the same axis, and
an Element is a contiguous set of alphanumeric characters ("word") on the same axis in most Latin languages, or a character in others
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
FAQs
VisionCamera Frame Processor Plugin to provide OCR support
The npm package vision-camera-ocr-v3 receives a total of 0 weekly downloads. As such, vision-camera-ocr-v3 popularity was classified as not popular.
We found that vision-camera-ocr-v3 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.