Skip to content

Image Smoothing vTool#

The Image Smoothing vTool allows you to remove background textures and image noise.

Image smoothing is a preprocessing step to reduce image noise. Another use case would be to produce an image containing only the background of the original image by removing all thin structures if you use a large enough filter mask.

The Image Smoothing vTool accepts an image via the Image input pin and outputs the filtered image via the Image output pin.

If you use the ROI Creator vTool to specify a region of interest before smoothing, the Image Smoothing vTool accepts the ROI data via its ROI input pin. In that case, smoothing is only performed on the region of interest which results in faster processing.

Image Smoothing vTool

How It Works#

The Image Smoothing vTool offers two standard filter operations:

  • Mean filtering
  • Binomial filtering

Mask Shapes#

Both operations use a rectangular mask with a specified width and height. Only odd values are allowed. This ensures that the mask always has a center pixel. The corresponding pixel in the output image will receive the gray value that is the result of the filtering operation.

If you open the settings dialog for the first time, width and height are linked. This means that you can change both parameters at the same time and the resulting mask will be square. You can also set width and height separately. To do this, click the chain icon to break the link between width and height.

  • Options linked: Chain Icon
  • Options unlinked: Chain Broken Icon

Mean Filtering#

The mean filter is a very efficient filter because of its speed even for large mask sizes. It calculates the average of the pixel gray values covered by the mask and applies this average value to the corresponding pixel at the center of the mask in the output image. All input pixels are weighted equally.

With a large mean filter, you can produce a kind of background image because small and sharp (high frequency) image structures are suppressed and big or smooth (low frequency) image structure are retained and stand out more clearly as a result.

By defining a very thin vertical or horizontal rectangular mask, you can emphasize vertical or horizontal image structures.

The maximum filter mask size is 1001 x 1001 pixels.

Binomial Filtering#

The binomial filter is a good approximation of the Gaussian filter, which is the ideal low-pass filter. Use the binomial filter for optimum smoothing results. Its execution takes a bit longer than the mean filter.

The mask used for binomial filtering assigns different weights to the pixels covered by the mask. These weights are derived from the binomial coefficients. The center pixel of the filter mask has the highest weight. The weights of the other pixels gradually decrease to zero the closer the pixels are to the border of the mask.

The maximum filter mask size is 37 x 37 pixels.

Configuring the vTool#

To configure the Image Smoothing vTool:

Image Smoothing Basic vTool Settings

  1. In the Recipe Management pane in the vTool Settings area, click Open Settings or double-click the vTool.
    The Image Smoothing Basic dialog opens.
  2. In the Smoothing Filter area, select the desired filter.
  3. Link/unlink the Width and Height options as required.
  4. Specify the width and height of the filter mask.

You can view the result of the smoothing in a pin data view.



Accepts images directly from a Camera vTool or from a vTool that outputs images, e.g., the Image Format Converter vTool.


Accepts a region of interest from the ROI Creator vTool or any other vTool that outputs regions or rectangles. Multiple rectangles or regions are merged internally to form a single region of interest.

  • Data type: RectangleF, RectangleF Array, Region, Region Array



Returns the filtered image. The output image can be used by any vTool accepting images as input.

Supported Pixel Formats#

Depending on the pixel format of the input image, the Image Combiner vTool outputs the following pixel formats:

Input Pixel Format Output Pixel Format
Bayer GR 8 RGB 8 Planar
Bayer GR 16 RGB 16 Planar
Bayer RG 8 RGB 8 Planar
BGRA 8 Packed RGB 8 Planar
BGR 8 Packed RGB 8 Planar
Mono 8 Mono 8
Mono 10 Mono 10
Mono 12 Mono 12
Mono 16 Mono 16
RGB 8 Packed RGB 8 Planar
RGB 16 Packed RGB 16 Planar
RGB 8 Planar RGB 8 Planar
RGB 16 Planar RGB 16 Planar

Typical Predecessors#

Typical Successors#