how to detect edge of paper in ios?

mc 4,116 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,298 questions
{count} votes

3 answers

Sort by: Most helpful
  1. S.Sengupta 18,026 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.


  2. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 29,876 Reputation points Microsoft Vendor
    2024-07-22T09:04:15.16+00:00

    Hello,

    You can use VNDetectRectanglesRequest, and it indeed doesn't support the system below iOS11 (iOS11 is supported).

    MAUI app that targets iOS platform can be written for iOS 11 or higher (the minimum support version is iOS11), so you can use vision kit and no need to worry about iOS version issues. See Supported platforms for .NET MAUI apps - .NET MAUI | Microsoft Learn

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Mansoor Khan 0 Reputation points
    2024-07-25T18:36:18.6733333+00:00

    To detect the edge of paper in iOS, you can utilize the Vision framework provided by Apple. By leveraging the VNDetectRectanglesRequest, you can detect rectangular shapes in an image, which is ideal for identifying paper edges. You'll need to capture an image, process it through the Vision framework, and analyze the results to find the edges of the paper. This process involves setting up a request handler, performing the rectangle detection, and handling the results to outline the paper's edges. Also, visit https://cashfrenzy-777.com/ for more.

    0 comments No comments