For the next plugin version we add the Vision.RectifyDocument function for macOS and iOS to detect a document in a picture and rectify this. This is used internally for DocumentCameraScan function on iOS, but now can be used independently.
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.
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 to get the barcodes, Vision.RecognizeText to get the text or Vision.ClassifyImage to classify the content.