# Rectify document rectangle in images in FileMaker

**URL:** <https://the.fmsoup.org/t/rectify-document-rectangle-in-images-in-filemaker/4376>\
**Category:** MBS Plugins\
**Tags:** integration, plugin, mbs\
**Created:** [October 24, 2024, 2:24pm UTC](https://the.fmsoup.org/t/rectify-document-rectangle-in-images-in-filemaker/4376 "2024-10-24T14:24:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MonkeybreadSoftware](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/monkeybreadsoftware/32/361_2.png) [@MonkeybreadSoftware](https://the.fmsoup.org/u/MonkeybreadSoftware)\
**Post date:** [October 24, 2024, 2:24pm UTC](https://the.fmsoup.org/t/rectify-document-rectangle-in-images-in-filemaker/4376/1 "2024-10-24T14:24:38Z")

</div>

For the next plugin version we add the [Vision.RectifyDocument](https://www.mbsplugins.eu/VisionRectifyDocument.shtml) function for macOS and iOS to detect a document in a picture and rectify this. This is used internally for [DocumentCameraScan](https://www.mbsplugins.eu/component_DocumentCameraScan.shtml) function on iOS, but now can be used independently.

```auto
MBS( "Vision.RectifyDocument"; Image { ; ImageType; FileName } )

```

To give you an example. You may have the picture on the left and use the function to get the picture on the right side.

![](https://www.mbsplugins.de/image/Rectify2.jpg) ![](https://www.mbsplugins.de/image/Rectify1.jpg)

The function uses machine learning to determinate the picture, process it on machine and provide a new picture. The area with the picture is detected, a transformation matrix is created and a new picture made with the transformation.

This function will help in combination with [Vision.DetectBarcode](https://www.mbsplugins.eu/VisionDetectBarcode.shtml) to get the barcodes, [Vision.RecognizeText](https://www.mbsplugins.eu/VisionRecognizeText.shtml) to get the text or [Vision.ClassifyImage](https://www.mbsplugins.eu/VisionClassifyImage.shtml) to classify the content.

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [October 24, 2024, 5:36pm UTC](https://the.fmsoup.org/t/rectify-document-rectangle-in-images-in-filemaker/4376/2 "2024-10-24T17:36:17Z")

</div>

I'm still blown away by things like this.

Can I get all of the hours of my life spent in front of Photoshop rotating, keystoning, and trimming given back to me please?
