As the instance is backed by a native resource, it should be disposed when it is no longer needed.
This method will release the native resource.
As a recommended alternative since the class implements AsyncDisposable one can use 'await using' syntax to ensure the resource is disposed of automatically.
If neither is used, the resource will be released when the instance is garbage collected which is not recommended.
A promise that resolves when the instance is disposed.
Straightens document photos by eliminating physical deformations and
The image of the document to straighten.
The parameters to use for straightening.
If it is known where the document corners (e.g. from a prior detection), those can be provided here.
The detection result.
StaticcreateInitialize the document enhancer.
Instance of DocumentStraightener.
StaticisCheck if the specified straightening mode is available (i.e. required assets are present).
The straightening mode to check.
True if the straightening mode is available, false otherwise.
Provides functionality to straighten document photos by eliminating
Example
Since the class is backed by native resources and implements
AsyncDisposableit's highly recommended to use theawait usingsyntax when an instance is created to ensure the resource is disposed automatically:Alternatively, one can explicitly call dispose method to release the native resource. If neither is used, the resource will be released when the instance is garbage collected which is not recommended.