How to crop detected rectangle in Image with CIDetector and Swift

Viewed 5494

I am working on an app that detect id cards and i am trying to use CIDetector built in ios to detect rectangle shape objects on live preview. i am using the solution explained in this tutorial here CoreImage Detectors

i am getting the flowing result image

My question : is there a way to extract and crop the detected rectangle ?

2 Answers
Related