Bilateral Filter
This function block applies an edge-preserving blur to an image. It smooths out noise and small variations while keeping sharp edges intact, making it useful for denoising photos where preserving object boundaries is important.
π₯ Inputs
Image AnyInput socket that accepts the image to be filtered (color or grayscale).
π€ Outputs
Image AnyOutput socket that provides the filtered image after applying the bilateral filter.
πΉοΈ Controls
Kernel SizeSlider to set the size of the filter kernel. Larger values increase the blur area and processing time.Sigma ValueSlider to set the sigma (strength) of the smoothing. Higher values produce stronger smoothing of color differences.
π¨ Features
Edge-preserving smoothing β reduces noise without blurring important edges.
Simple two-parameter control β adjust kernel size and sigma for intuitive tuning.
Works with color and grayscale images.
π Usage Instructions
Provide an image to the
Image Anyinput socket (for example from a camera or a loaded image).Adjust
Kernel Sizeto control how wide the smoothing area is.Adjust
Sigma Valueto control how strongly nearby colors are blended.Read the processed image from the
Image Anyoutput socket and preview with theShow Imageblock if needed.
π Evaluation
When executed, the block reads the incoming image, applies the bilateral filter using the chosen kernel size and sigma, and outputs the smoothed image while preserving edges.
π‘ Tips and Tricks
For quick visual checks, connect a camera or file input before this block. Useful input blocks:
Camera USB,Load Image,Stream Reader.If your input images are very large and the filter is slow, add
Image Resizebefore this block to reduce processing time.To compare results or save outputs, use
Show Imageto preview andImage LoggerorImage Writeto store examples.Combine with
DenoisingorBlurbeforehand when the image has heavy noise; sometimes a light pre-blur followed by bilateral gives better visual results.To limit filtering to a region, mask the image first using
Apply Maskand then feed the masked image to this block.
π οΈ Troubleshooting
If edges look too soft:
Reduce
Kernel Sizeor lowerSigma Value.
If processing is slow:
Reduce input resolution with
Image Resizeor choose a smallerKernel Size.
If results are not noticeably different:
Increase
Sigma Valueto strengthen smoothing, or verify the input image actually contains noise to remove.
If no image appears at output:
Ensure the
Image Anyinput socket is connected to a valid image source. UseShow Imageto confirm incoming data.
Last updated