https://github.com/miyako/4d-plugin-vision
Use Vision API (macOS).
https://github.com/miyako/4d-plugin-vision
4d-plugin ocr
Last synced: 15 days ago
JSON representation
Use Vision API (macOS).
- Host: GitHub
- URL: https://github.com/miyako/4d-plugin-vision
- Owner: miyako
- License: mit
- Created: 2020-12-31T19:03:57.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-04-05T09:56:14.000Z (about 3 years ago)
- Last Synced: 2025-02-26T04:17:31.427Z (over 1 year ago)
- Topics: 4d-plugin, ocr
- Language: C
- Homepage:
- Size: 4.72 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README


[](LICENSE)

**Note**: for v17 and earlier, move `manifest.json` to `Contents`
# 4d-plugin-vision
Use [Vision](https://developer.apple.com/documentation/vision?language=objc) API (macOS).
### Syntax
```4d
$file:=Folder(fk resources folder).file("faces.jpg")
DOCUMENT TO BLOB($file.platformPath;$imageData)
$params.targets:=New collection("part";"text")
$status:=vision process data ($imageData;$params)
```
#### possible targets:
* face
* part (face landmarks=facial features)
* text (OCR, en-US only)
* string (characters)
* rect
* horizon
* barcode
* human
* animal (dog or cat only)
#### About OCR by Vision
The plugin is configured to target 10.13 minimum, but API availability is progressive.
##### 10.14 or above
* face landmark
##### 10.15 or above
* part > face capture quality
* text
* human
* animal
To use on v17, move manifest.json to contents.
* [Text example](https://github.com/miyako/4d-plugin-vision/blob/main/vision/test/Project/Sources/Methods/TEST_text.4dm)

* [Faces example](https://github.com/miyako/4d-plugin-vision/blob/main/vision/test/Project/Sources/Methods/TEST_faces.4dm)

* [Animal example](https://github.com/miyako/4d-plugin-vision/blob/main/vision/test/Project/Sources/Methods/TEST_animal.4dm)