The vizfx.postprocess.blur library is a collection of effects that perform various kinds of blurring on the rendered image.
Applies a gaussian blur to the image.
Constructor |
Description |
GaussianBlurEffect( blurRadius = 0, blurScale = 0.0, downsample = 0.5 ) |
Create the gaussian blur effect with the initial blur radius, scale, and downsample values. |
Method |
Description |
<effect>.setBlurRadius(value) |
Set the blur radius, in pixels. A higher radius make the image blurrier, but requires more processing time. |
<effect>.getBlurRadius() |
Get the blur radius, in pixels. |
<effect>.setBlurScale(value) |
Set the blur scale. Scaling upwards will increase the blurriness without needing extra processing, but at a loss in quality. |
<effect>.getBlurScale() |
Get the blur scale. This effectively scales the radius, without increasing the number of samples taken. |
<effect>.setDownsample(value) |
Set the downsample scale factor for the incoming image before performing the blur. Lowering the downsample size will reduce processing time, but at a loss in quality. |
<effect>.getDownsample() |
Get the downsample scale factor. |
This effect can be registered with vizconfig.
Applies a box blur to the image. A box blur is an unweighted blur filter that simply takes the average of the neighboring pixels.
Constructor |
Description |
BoxBlurEffect( blurRadius = 0, blurScale = 0.0, downsample = 0.5 ) |
Create the gaussian blur effect with the initial blur radius, scale, and downsample values.
|
Method |
Description |
<effect>.setBlurRadius(value) |
Set the blur radius, in pixels. A higher radius make the image blurrier, but requires more processing time. |
<effect>.getBlurRadius() |
Get the blur radius, in pixels. |
<effect>.setBlurScale(value) |
Set the blur scale. Scaling upwards will increase the blurriness without needing extra processing, but at a loss in quality. |
<effect>.getBlurScale() |
Get the blur scale. This effectively scales the radius, without increasing the number of samples taken. |
<effect>.setDownsample(value) |
Set the downsample scale factor for the incoming image before performing the blur. Lowering the downsample size will reduce processing time, but at a loss in quality. |
<effect>.getDownsample() |
Get the downsample scale factor. |
This effect can be registered with vizconfig.
Applies a directional blur to the image. All the pixels will be blurred along a single specified direction vector.
Constructor |
Description |
DirectionalBlurEffect( distance = 0.0, angle = 0.0, samples = 20 ) |
Create the directional blur effect with the initial distance, angle, and blur samples. |
Method |
Description |
<effect>.setDistance(value) |
Set the distance along the direction vector to blur, in pixels. |
<effect>.getDistance() |
Get the distance along the direction vector to blur, in pixels. |
<effect>.setAngle(value) |
Set the direction angle to blur along, in degrees. 0 is upward, and positive angles go clockwise. |
<effect>.getAngle() |
Get direction angle to blur along, in degrees. |
<effect>.setSamples(value) |
Set the number of blur samples per pixel. More samples make the blur smoother, but requires more computation. |
<effect>.getSamples() |
Get the number of blur samples per pixel. |
This effect can be registered with vizconfig.
Applies a zoom blur to the image. All the pixels will be blurred towards the specified center of the image.
Constructor |
Description |
ZoomBlurEffect( zoom = 0.0, radius = 0.0, center = (0.5,0.5), samples = 20 ) |
Create the zoom blur effect with the initial zoom factor, radius, center, and blur samples. |
Method |
Description |
<effect>.setZoom(value) |
Set the zoom factor. A positive value zooms in and negative zooms out. |
<effect>.getZoom() |
Get the zoom factor. |
<effect>.setRadius(value) |
Set the radius about the center where the blurring will begin. The radius is in normalized (0-1) image units. |
<effect>.getRadius() |
Get the radius in normalized (0-1) image units. |
<effect>.setCenter(value) |
Set the zoom [x,y] center in normalized (0-1) image units. |
<effect>.getCenter() |
Get the zoom [x,y] center in normalized (0-1) image units. |
<effect>.setSamples(value) |
Set the number of blur samples per pixel. More samples make the blur smoother, but requires more computation. |
<effect>.getSamples() |
Get the number of blur samples per pixel. |
This effect can be registered with vizconfig.
Applies a radial blur to the image. All the pixels will be blurred around the specified center of the image.
Constructor |
Description |
RadialBlurEffect( angle = 0.0, radius = 0.0, center = (0.5,0.5), samples = 20 ) |
Create the radial blur effect with the initial blur angle, radius, center, and blur samples. |
Method |
Description |
<effect>.setAngle(value) |
Set the radial blur angle, in degrees. The image will be rotated about the specified center in the given angle range. |
<effect>.getAngle() |
Get the radial blur angle, in degrees. |
<effect>.setRadius(value) |
Set the radius about the center where the blurring will begin. The radius is in normalized (0-1) image units. |
<effect>.getRadius() |
Get the radius in normalized (0-1) image units. |
<effect>.setCenter(value) |
Set the radial blur [x,y] center in normalized (0-1) image units. |
<effect>.getCenter() |
Get the radial blur [x,y] center in normalized (0-1) image units. |
<effect>.setSamples(value) |
Set the number of blur samples per pixel. More samples make the blur smoother, but requires more computation. |
<effect>.getSamples() |
Get the number of blur samples per pixel. |
This effect can be registered with vizconfig.
Applies a fragment blur to the image. Multiple copies (fragments) of the image are drawn at a specified distance and in equal angular increments from the center.
Constructor |
Description |
FragmentBlurEffect( distance = 0, angle = 0.0, samples = 4 ) |
Create the fragment blur effect with the initial distance , angle, and fragment samples. |
Method |
Description |
<effect>.setDistance(value) |
Set the distance of each fragment in pixels. |
<effect>.getDistance() |
Get the distance of each fragment in pixels. |
<effect>.setAngle(value) |
Set rotation angle offset of each fragment, in degrees. |
<effect>.getAngle() |
Get rotation angle offset of each fragment, in degrees. |
<effect>.setSamples(value) |
Set the number of blur samples per pixel. More samples make the blur smoother, but requires more computation. |
<effect>.getSamples() |
Get the number of blur samples per pixel. |
This effect can be registered with vizconfig.
Applies a tilt shift blur to the image. This effectively creates a plane across the image that is in focus and the pixels gradually become unfocused (blurred) as they move away from the plane.
Constructor |
Description |
TiltShiftEffect( focusSize = 0.3, gradientSize = 0.3, blurRadius = 0.0, blurScale = 1.0, angle = 0.0, center = (0.5, 0.5), downsample = 0.5 ) |
Create the tilt shift effect with the initial parameters. |
Method |
Description |
<effect>.setFocusSize(value) |
Set the size of the focus plane in normalized (0-1) image units. |
<effect>.getFocusSize() |
Get the size of the focus plane in normalized (0-1) image units. |
<effect>.setGradientSize(value) |
Set the size of the focus to blur gradient in normalized (0-1) image units. |
<effect>.getGradientSize() |
Get the size of the focus to blur gradient in normalized (0-1) image units. |
<effect>.setBlurRadius(value) |
Set the blur radius, in pixels. A higher radius make the image blurrier, but requires more processing time. |
<effect>.getBlurRadius() |
Get the blur radius, in pixels. |
<effect>.setBlurScale(value) |
Set the blur scale. Scaling upwards will increase the blurriness without needing extra processing, but at a loss in quality. |
<effect>.getBlurScale() |
Get the blur scale. This effectively scales the radius, without increasing the number of samples taken. |
<effect>.setDownsample(value) |
Set the downsample scale factor for the incoming image before performing the blur. Lowering the downsample size will reduce processing time, but at a loss in quality. |
<effect>.getDownsample() |
Get the downsample scale factor. |
<effect>.setAngle(value) |
Set the rotation angle of the focus plane, in degrees. 0 is upward, and positive angles go clockwise. |
<effect>.getAngle() |
Get the rotation angle of the focus plane, in degrees. |
<effect>.setCenter(value) |
Set the [x,y] center of the focus plane in normalized (0-1) image units. The focus plane will be rotated about this center. |
<effect>.getCenter() |
Get the [x,y] center of the focus plane in normalized (0-1) image units. |
This effect can be registered with vizconfig.
Applies a radial tilt shift blur to the image. This effectively creates a circular area in the image that is in focus and the pixels gradually become unfocused (blurred) as they move away from the circle.
Constructor |
Description |
RadialTiltShiftEffect( radius = 0.3, gradientSize = 0.3, blurRadius = 0.0, blurScale = 1.0, center = (0.5, 0.5), downsample = 0.5 ) |
Create the radial tilt shift effect with the initial parameters. |
Method |
Description |
<effect>.setRadius(value) |
Set the focal radius in normalized (0-1) image units. |
<effect>.getRadius() |
Get the focal radius in normalized (0-1) image units. |
<effect>.setGradientSize(value) |
Set the size of the focus to blur gradient in normalized (0-1) image units. |
<effect>.getGradientSize() |
Get the size of the focus to blur gradient in normalized (0-1) image units. |
<effect>.setBlurRadius(value) |
Set the blur radius, in pixels. A higher radius make the image blurrier, but requires more processing time. |
<effect>.getBlurRadius() |
Get the blur radius, in pixels. |
<effect>.setBlurScale(value) |
Set the blur scale. Scaling upwards will increase the blurriness without needing extra processing, but at a loss in quality. |
<effect>.getBlurScale() |
Get the blur scale. This effectively scales the radius, without increasing the number of samples taken. |
<effect>.setDownsample(value) |
Set the downsample scale factor for the incoming image before performing the blur. Lowering the downsample size will reduce processing time, but at a loss in quality. |
<effect>.getDownsample() |
Get the downsample scale factor. |
<effect>.setCenter(value) |
Set the [x,y] center of the focus circle in normalized (0-1) image units. |
<effect>.getCenter() |
Get the [x,y] center of the focus circle in normalized (0-1) image units. |
This effect can be registered with vizconfig.