Warning: This project is deprecated. TensorFlow Addons has stopped development,
The project will only be providing minimal maintenance releases until May 2024. See the full
announcement here or on
github.
tfa.image.mean_filter2d
Stay organized with collections
Save and categorize content based on your preferences.
Perform mean filtering on image(s).
@tf.function
tfa.image.mean_filter2d(
image: tfa.types.TensorLike
,
filter_shape: Union[int, Iterable[int]] = (3, 3),
padding: str = 'REFLECT',
constant_values: tfa.types.TensorLike
= 0,
name: Optional[str] = None
) -> tf.Tensor
Used in the notebooks
Args |
image
|
Either a 2-D Tensor of shape [height, width] ,
a 3-D Tensor of shape [height, width, channels] ,
or a 4-D Tensor of shape [batch_size, height, width, channels] .
|
filter_shape
|
An integer or tuple /list of 2 integers, specifying
the height and width of the 2-D mean filter. Can be a single integer
to specify the same value for all spatial dimensions.
|
padding
|
A string , one of "REFLECT", "CONSTANT", or "SYMMETRIC".
The type of padding algorithm to use, which is compatible with
mode argument in tf.pad . For more details, please refer to
https://www.tensorflow.org/api_docs/python/tf/pad.
|
constant_values
|
A scalar , the pad value to use in "CONSTANT"
padding mode.
|
name
|
A name for this operation (optional).
|
Returns |
2-D, 3-D or 4-D Tensor of the same dtype as input.
|
Raises |
ValueError
|
If image is not 2, 3 or 4-dimensional,
if padding is other than "REFLECT", "CONSTANT" or "SYMMETRIC",
or if filter_shape is invalid.
|
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 2023-05-25 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-05-25 UTC."],[],[]]