https://github.com/acsandmann/vision.rs
n-api bindings for apple vision
https://github.com/acsandmann/vision.rs
apple-vision-framework coreml napi ocr rust
Last synced: 9 months ago
JSON representation
n-api bindings for apple vision
- Host: GitHub
- URL: https://github.com/acsandmann/vision.rs
- Owner: acsandmann
- License: gpl-3.0
- Created: 2024-06-12T02:00:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-25T00:14:18.000Z (over 1 year ago)
- Last Synced: 2025-01-28T16:38:56.783Z (12 months ago)
- Topics: apple-vision-framework, coreml, napi, ocr, rust
- Language: Rust
- Homepage:
- Size: 396 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @asandmann/vision
This module provides simple and easy-to-use bindings to Apple's vision-framework and more specifically their VNRecognizeTextRequest function. As such, this will only run on machines running Apple software.
### Example
```typescript
import { vnRecognizeTextRequest } from '@asandmann/vision';
import { readFile } from 'fs/promises';
const buffer = await readFile('path/to/image.png');
// Using the function
const res1 = vnRecognizeTextRequest( buffer);
console.log('Recognized text:', res1.join('\n'));
```