An open API service indexing awesome lists of open source software.

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).

Awesome Lists containing this project

README

          

![platform](https://img.shields.io/static/v1?label=platform&message=mac-intel%20|%20mac-arm&color=blue)
![version](https://img.shields.io/badge/version-17%2B-3E8B93)
[![license](https://img.shields.io/github/license/miyako/4d-plugin-vision)](LICENSE)
![downloads](https://img.shields.io/github/downloads/miyako/4d-plugin-vision/total)

**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)