Skip to content
Discussion options

You must be logged in to vote

Hi @aubest, you could use NormalizeIntensity.

class NormalizeIntensity(Transform):
"""
Normalize input based on the `subtrahend` and `divisor`: `(img - subtrahend) / divisor`.
Use calculated mean or std value of the input image if no `subtrahend` or `divisor` provided.
This transform can normalize only non-zero values or entire image, and can also calculate
mean and std on each channel separately.
When `channel_wise` is True, the first dimension of `subtrahend` and `divisor` should
be the number of image channels if they are not None.

Hope it can help you, thanks!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wyli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #6169 on March 20, 2023 03:19.