The images are displayed at the wrong angle

Issue:

The original image is tilted at an angle. How can I obtain the correctly oriented image?

Solution:

To correctly rotate the document to the desired angle, follow these steps.

  1. Process the original image. During the processing, several containers with different values are obtained. We need two specific containers: DocumentPosition (result_type 85) and OneCandidate (result_type 9).

  2. Obtaining the rotation angle: In the ContainerList.List array, locate the DocumentPosition object where the Angle: -37.066749572753906 value is present.

  3. The original image should be rotated by the specified angle. After the rotation, the image will have a similar position as shown in the screenshot. This is typically the first step in document rotation for processing and recognition purposes.

  4. After recognition, we obtain the OneCandidate result where the RotationAngle: 90 value is present. The image needs to be rotated by this angle to achieve the correct orientation for the user.

  5. To achieve the desired result, add both angle values and rotate the original image by the obtained angle. In this example: 90+(-37.066749572753906)=52.93325042724609.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.

Articles in this section

See more