ImageMasking Class
Contents
[
Hide
]Summary: Provides image masking operations
Module: aspose.imaging.masking
Full Name: aspose.imaging.masking.ImageMasking
Constructors
Name | Description |
---|---|
ImageMasking(source_image) | Initializes a new instance of the ImageMasking class. |
Methods
Name | Description |
---|---|
apply_mask(target_image, mask, masking_options) | Applies the mask to specified source image. |
create_session(options) | Creates the masking session which can perform retraining decompose operations. |
decompose(options) | Performs the decompose operation using specified masking options |
decompose_async(options) | Creates the asynchronous decompose task using specified masking options. |
load_session(file_path) | Load the session from the specified file. |
load_session(stream) | Load the session from the specified stream. |
load_session_from_stream(stream) | Load the session from the specified stream. |
Constructor: ImageMasking(source_image)
ImageMasking(source_image)
Initializes a new instance of the ImageMasking class.
Parameters:
Parameter | Type | Description |
---|---|---|
source_image | RasterImage | The source image. |
Method: apply_mask(target_image, mask, masking_options) [static]
apply_mask(target_image, mask, masking_options)
Applies the mask to specified source image.
Parameters:
Parameter | Type | Description |
---|---|---|
target_image | RasterImage | The target image. |
mask | RasterImage | The mask image to apply. |
masking_options | MaskingOptions | The masking options. |
Method: create_session(options)
create_session(options)
Creates the masking session which can perform retraining decompose operations.
Parameters:
Parameter | Type | Description |
---|---|---|
options | MaskingOptions | The options. |
Returns
Type | Description |
---|---|
IMaskingSession | the masking session which can perform retraining decompose operations. |
Method: decompose(options)
decompose(options)
Performs the decompose operation using specified masking options
Parameters:
Parameter | Type | Description |
---|---|---|
options | MaskingOptions | The masking options. |
Returns
Type | Description |
---|---|
MaskingResult | Result of masking operation as array of segment image providers. |
Method: decompose_async(options)
decompose_async(options)
Creates the asynchronous decompose task using specified masking options.
Parameters:
Parameter | Type | Description |
---|---|---|
options | MaskingOptions | The masking options. |
Returns
Type | Description |
---|---|
IMaskingAsyncTask | The asynchronous decompose task |
Method: load_session(file_path)
load_session(file_path)
Load the session from the specified file.
Parameters:
Parameter | Type | Description |
---|---|---|
file_path | string | The file path. |
Returns
Type | Description |
---|---|
IMaskingSession | the masking session which can perform retraining decompose operations. |
Method: load_session(stream)
load_session(stream)
Load the session from the specified stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream. |
Returns
Type | Description |
---|---|
IMaskingSession | the masking session which can perform retraining decompose operations. |
Method: load_session_from_stream(stream)
load_session_from_stream(stream)
Load the session from the specified stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream. |
Returns
Type | Description |
---|---|
IMaskingSession | the masking session which can perform retraining decompose operations. |