how to detect edge of paper in ios?

mc 4,066 Reputation points
2024-07-13T00:39:35.8+00:00

how to do edge-detection in ios?

I want to use camera to capture paper and remove the other info. just leave the paper.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,176 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. S.Sengupta 17,031 Reputation points MVP
    2024-07-13T01:17:19.1833333+00:00

    To do this you can use the Vision framework along with Core Image. It involves the following steps:

    Set up the camera capture session-Use the AVCaptureSession for this.

    Perform edge detection using VNDetectRectanglesRequest.

    Process the detected rectangle.

    Crop and perspective-correct the image.

    0 comments No comments