withAspectRatioForOrientations method of the AreaOfInterest class

Sets two aspect ratio values of the area of interest for different camera orientation. The aspect ratio is counted by division of the document's width to its height.

Setting separate values for different orientation types allow you to invert or save unchanged the area of interest if the end-user changes the camera orientation.

To invert the area of interest, you should pass the two opposite aspect ratio values, i.e. 2 and 0.5.

To save the area of interest unchanged, pass the equal aspect ratio values, i.e. 2 and 2.

AreaOfInterest withAspectRatioForOrientations( Float portrait, Float landscape )

Parameters

portrait
The aspect ratio value, calculated by division of the lower length limit to upper length limit. 0 if not set.
landscape
The aspect ratio value, calculated by division of the upper length limit to lower length limit. 0 if not set.

Return values

The method returns an instance of an AreaOfInterest class with the passed to the method aspect ratio value.

3/2/2022 12:59:15 PM

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.