Why didn't the app detect the document boundary correctly?
If the app did not detect the document boundary accurately, please try to keep the background of your document as clean as possible.
Clear the table of all other objects before taking the pictures.
The most ideal environment for accurate detection is to keep only the document in the image.
You can also turn off the auto detection on the top left corner of the camera, and select the document boundary manually.