Skip to content

Conversation

@kdpenner
Copy link
Contributor

Changes proposed in this pull request:

  • The argument for GaussianBlur is radius. The canonical name for the parameter is standard deviation. The value for the standard normal distribution at a given radius is a function of standard deviation.
  • GaussianBlur doesn't convolve the image with a Gaussian kernel. It uses a kernel that when applied iteratively approximates a Gaussian kernel.

The changes improve the precision of the documentation.

@radarhere
Copy link
Member

@homm you wrote the C implementation in #961. Did you want to quickly review this?

class GaussianBlur(MultibandFilter):
"""Gaussian blur filter.
"""Blurs the image with an extended box filter, which approximates a
Gaussian kernel.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth to mention that approximation is very accurate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of "very accurate" I prefer to give a notion of the accuracy. In this case it depends on a few variables so I put in the link in the C header.

@hugovk hugovk merged commit bdc87f6 into python-pillow:master Jun 28, 2021
@kdpenner kdpenner deleted the gaussian-doc branch June 29, 2021 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants