Vision.DetectBarcode
--------------------

Detects barcodes in images.

| 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.DetectBarcode"; Image { ; symbologies } ) 

**MBS**( **"Vision.DetectBarcode";** /\* Detects barcodes in images. \*/  
**$Image**; /\* The image to analyze.  
Can be container value with JPEG, PNG or other image formats supported by Vision framework. \*/   
**$symbologies**) /\* Optional; Which symbologies to allow.  
Default is all, e.g. the list returned by [Vision.SupportedSymbologies](VisionSupportedSymbologies.md) function.e.g. "VNBarcodeSymbologyQR" \*/ 

### 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 |  |
| symbologies | Which symbologies to allow.   Default is all, e.g. the list returned by [Vision.SupportedSymbologies](VisionSupportedSymbologies.md) function. | "VNBarcodeSymbologyQR" | Optional |

### Result

Returns JSON or error.

### Description

Detects barcodes in images.  
Returns JSON array with all recognized barcodes.  
You may improve recognition by cropping the picture to the area with barcode and providing a good resolution.  
  
If you need cross platform barcode detection, please use [Barcode.Scan](BarcodeScan.md) or [Barcode.Detect](BarcodeDetect.md) functions.  
  
Added for macOS 12: Codabar, GS1DataBar, GS1DataBarExpanded, GS1DataBarLimited, MicroPDF417 and MicroQR.  
### Examples

Detect barcode:

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

- [Barcode.Detect](BarcodeDetect.md)
- [Barcode.Scan](BarcodeScan.md)
- [CoreImage.Detect](CoreImageDetect.md)
- [Vision.SupportedSymbologies](VisionSupportedSymbologies.md)

### Release notes

- **Version 15.3**
    - Changed [Vision.DetectBarcode](https://www.mbsplugins.eu/VisionDetectBarcode.shtml) to detect OS version and use newer engine if available.
    - Improved [Vision.DetectBarcode](https://www.mbsplugins.eu/VisionDetectBarcode.shtml) function to report more details like coordinates.
    - Improved [Vision.DetectBarcode](https://www.mbsplugins.eu/VisionDetectBarcode.shtml) to return swapped coordinates.
- **Version 11.3**
    - Updated [Vision.DetectBarcode](https://www.mbsplugins.eu/VisionDetectBarcode.shtml) and [Vision.SupportedSymbologies](https://www.mbsplugins.eu/VisionSupportedSymbologies.shtml) to support newer barcode types in macOS 12.
- **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.
- **Version 9.5**
    - Fixed [Vision.DetectBarcode](http://www.mbsplugins.eu/VisionDetectBarcode.shtml) to return proper JSON.

### Example Databases

- [Barcode/Barcode Detection](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Barcode/Barcode%20Detection.shtml#6ScriptAnchor_)
- [Barcode/Barcodes from Invoices](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Barcode/Barcodes%20from%20Invoices.shtml#2ScriptAnchor_)
- [Mac and iOS/Vision Barcodes](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Vision%20Barcodes.shtml#1ScriptAnchor_)
- [Mac and iOS/Vision](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Vision.shtml#2ScriptAnchor_)

### Blog Entries

- [MBS Plugin 15.3 for Claris FileMaker](https://www.mbsplugins.de/archive/2025-07-15/MBS_Plugin_153_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 15.3pr1](https://www.mbsplugins.de/archive/2025-06-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [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 11.3 - More than 6500 Functions In One Plugin](https://www.mbsplugins.de/archive/2021-07-12/MBS_FileMaker_Plugin_113_-_Mor/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 11.3pr4](https://www.mbsplugins.de/archive/2021-06-22/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Using zbar library with FileMaker](https://www.mbsplugins.de/archive/2021-06-21/Using_zbar_library_with_FileMa/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)
- [MBS FileMaker Plugin, version 9.5pr1](https://www.mbsplugins.de/archive/2019-10-02/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)
- [Vision Framework for FileMaker](https://www.mbsplugins.de/archive/2019-08-19/Vision_Framework_for_FileMaker/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 6/2024, Seite 14](https://filemaker-magazin.de/neuigkeit/4277-Appetithappen-FMM_202406)
- [Ausgabe 1/2023, Seite 31](https://filemaker-magazin.de/neuigkeit/4218-Appetithappen-FMM_202301)

This function checks for a license.

Created 18th August 2019 , last changed 17th June 2021

  
[Vision.ClassifyImage](VisionClassifyImage.md) - [Vision.KnownClassifications](VisionKnownClassifications.md)

[HTML Version](VisionDetectBarcode.shtml)