tf.image.per_image_standardization
Stay organized with collections
Save and categorize content based on your preferences.
Linearly scales each image in image
to have mean 0 and variance 1.
tf.image.per_image_standardization(
image
)
For each 3-D image x
in image
, computes (x - mean) / adjusted_stddev
,
where
mean
is the average of all values in x
adjusted_stddev = max(stddev, 1.0/sqrt(N))
is capped away from 0 to
protect against division by 0 when handling uniform images
N
is the number of elements in x
stddev
is the standard deviation of all values in x
Args |
image
|
An n-D Tensor with at least 3 dimensions, the last 3 of which are the
dimensions of each image.
|
Returns |
A Tensor with same shape and dtype as image .
|
Raises |
ValueError
|
if the shape of 'image' is incompatible with this function.
|
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 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.image.per_image_standardization\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 2 version](/api_docs/python/tf/image/per_image_standardization) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/image_ops_impl.py#L1477-L1519) |\n\nLinearly scales each image in `image` to have mean 0 and variance 1.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.image.per_image_standardization`](/api_docs/python/tf/image/per_image_standardization), \\`tf.compat.v2.image.per_image_standardization\\`\n\n\u003cbr /\u003e\n\n tf.image.per_image_standardization(\n image\n )\n\nFor each 3-D image `x` in `image`, computes `(x - mean) / adjusted_stddev`,\nwhere\n\n- `mean` is the average of all values in `x`\n- `adjusted_stddev = max(stddev, 1.0/sqrt(N))` is capped away from 0 to protect against division by 0 when handling uniform images\n - `N` is the number of elements in `x`\n - `stddev` is the standard deviation of all values in `x`\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------|-------------------------------------------------------------------------------------------------|\n| `image` | An n-D Tensor with at least 3 dimensions, the last 3 of which are the dimensions of each image. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `Tensor` with same shape and dtype as `image`. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|-------------------------------------------------------------|\n| `ValueError` | if the shape of 'image' is incompatible with this function. |\n\n\u003cbr /\u003e"]]