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 Any Input socket that accepts the image to be filtered (color or grayscale).

πŸ“€ Outputs

  • Image Any Output socket that provides the filtered image after applying the bilateral filter.

πŸ•ΉοΈ Controls

  • Kernel Size Slider to set the size of the filter kernel. Larger values increase the blur area and processing time.

  • Sigma Value Slider 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

  1. Provide an image to the Image Any input socket (for example from a camera or a loaded image).

  2. Adjust Kernel Size to control how wide the smoothing area is.

  3. Adjust Sigma Value to control how strongly nearby colors are blended.

  4. Read the processed image from the Image Any output socket and preview with the Show Image block 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 Resize before this block to reduce processing time.

  • To compare results or save outputs, use Show Image to preview and Image Logger or Image Write to store examples.

  • Combine with Denoising or Blur beforehand 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 Mask and then feed the masked image to this block.

πŸ› οΈ Troubleshooting

  • If edges look too soft:

    • Reduce Kernel Size or lower Sigma Value.

  • If processing is slow:

    • Reduce input resolution with Image Resize or choose a smaller Kernel Size.

  • If results are not noticeably different:

    • Increase Sigma Value to strengthen smoothing, or verify the input image actually contains noise to remove.

  • If no image appears at output:

    • Ensure the Image Any input socket is connected to a valid image source. Use Show Image to confirm incoming data.

Last updated