Vision.ClassifyImage
--------------------

Classifies content of image.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Vision](component_Vision.md) | [9.4](newinversion94.md) | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |

MBS( "Vision.ClassifyImage"; Image { ; Best } ) 

**MBS**( **"Vision.ClassifyImage";** /\* Classifies content of image. \*/  
**$Image**; /\* The image to analyze.  
Can be container value with JPEG, PNG or other image formats supported by Vision framework. \*/   
**$Best**) /\* Optional; Whether to return only identifier of best.  
Default is 1.  
If you pass 0, you get back JSON with all classifications and their confidence.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Image | The image to analyze.   Can be container value with JPEG, PNG or other image formats supported by Vision framework. | $image |  |
| Best | Whether to return only identifier of best.   Default is 1.   If you pass 0, you get back JSON with all classifications and their confidence. | 1 | Optional |

### Result

Returns text or error.

### Description

Classifies content of image.  
Requires MacOS 10.15 or iOS 13.0 or newer.  
  
If you like to use your own CoreML model, please try our own [CoreML](component_CoreML.md) functions.  
### Examples

Classify image in container:

 Set Field \[ Vision::Result ; MBS ( "Vision.ClassifyImage"; Vision::Image ) \]  
### See also

- [CoreImage.Detect](CoreImageDetect.md)
- [CoreML.OpenModel](CoreMLOpenModel.md)
- [CoreML.PredictionFromFeatures](CoreMLPredictionFromFeatures.md)

### Release notes

- **Version 10.5**
    - Fixed memory leaks in [BinaryFile.WriteContainer](https://www.mbsplugins.eu/BinaryFileWriteContainer.shtml), [Container.ReadImage](https://www.mbsplugins.eu/ContainerReadImage.shtml), [Vision.ClassifyImage](https://www.mbsplugins.eu/VisionClassifyImage.shtml), [Vision.DetectBarcode](https://www.mbsplugins.eu/VisionDetectBarcode.shtml) and [Vision.RecognizeText](https://www.mbsplugins.eu/VisionRecognizeText.shtml) functions.

### Example Databases

- [Mac and iOS/Vision](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Vision.shtml#1ScriptAnchor_)

### Blog Entries

- [Rectify document rectangle in images in FileMaker](https://www.mbsplugins.de/archive/2024-10-22/Rectify_document_rectangle_in_/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin Advent calendar: 2 - Vision](https://www.mbsplugins.de/archive/2023-12-02/MBS_Plugin_Advent_calendar_2_-/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.5pr7](https://www.mbsplugins.de/archive/2020-11-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Neue Funktionen des MBS FileMaker Plugin 9.4](https://www.mbsplugins.de/archive/2019-10-05/Neue_Funktionen_des_MBS_FileMa/monkeybreadsoftware_blog_filemaker)
- [Vision Framework for FileMaker](https://www.mbsplugins.de/archive/2019-08-19/Vision_Framework_for_FileMaker/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2019 , last changed 19th August 2019

  
[VersionAutoUpdate](VersionAutoUpdate.md) - [Vision.DetectBarcode](VisionDetectBarcode.md)

[HTML Version](VisionClassifyImage.shtml)