mp.tasks.vision.ImageProcessingOptions
Stay organized with collections
Save and categorize content based on your preferences.
Options for image processing.
mp.tasks.vision.ImageProcessingOptions(
region_of_interest: Optional[rect_module.RectF] = None,
rotation_degrees: int = 0
)
If both region-of-interest and rotation are specified, the crop around the
region-of-interest is extracted first, then the specified rotation is applied
to the crop.
Attributes |
region_of_interest
|
The optional region-of-interest to crop from the image.
If not specified, the full image is used. Coordinates must be in [0,1]
with 'left' < 'right' and 'top' < 'bottom'.
|
rotation_degrees
|
The rotation to apply to the image (or cropped
region-of-interest), in degrees clockwise. The rotation must be a multiple
(positive or negative) of 90°.
|
Methods
__eq__
__eq__(
other
)
Return self==value.
Class Variables |
|
region_of_interest
|
None
|
|
rotation_degrees
|
0
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-11-05 UTC.
[null,null,["Last updated 2026-11-05 UTC."],[],[]]