correct_rotation¶
Return the input image in the coordinate frame of an analysis result.
When rotation correction (enable_preprocess=True) is applied, all
coordinates in the result refer to the orientation-corrected image. Pass
the original input image together with its result to get the image that
matches those coordinates, e.g. before create_searchable_pdf() or
figure export. If no rotation was applied, the image is returned as is.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
img
|
ndarray
|
The original input image passed to the analyzer. |
required |
result
|
An analysis result with a |
required |
Returns:
| Type | Description |
|---|---|
|
np.ndarray: The image whose orientation matches the result coordinates. |