Use the **Focal analysis** block to calculate new values based on the values of neighbouring pixels. The results of the focal analysis are added to a new band.

The focal analysis block has three options:

## Smooth my image

Reduces sharp features and visually blurs the image by calculating the mean of the values of neighbouring pixels. This is useful for reducing the speckle effect in a radar image, or creating averages of discrete occurrences such as fires.

### Select bands

Choose the bands that you would like to be smoothed.

### Suffix for new band

Choose the suffix for the new bands that will be created.

### Kernel

The kernel is the area surrounding the pixel that is being calculated. All of these ‘neighbouring’ pixels in this area are included in the calculation.

You can choose:

### Radius

Determines the size of the kernel. The larger the radius, the smoother the result.

### Units

Determine the size of the kernel using either pixels or metres.

Pixelsuses the pixel size of the outputted map layer, rather than the pixel size of the original data.

### Normalise

Checking ‘Normalise’ will weight the value of each pixel within the kernel so that the sum of values in the kernel is equal to the specified magnitude.

### Magnitude

Sets the range for the normalised smoothing. For example, a magnitude of 5 would have a maximum possible value of 5.

## Detect edges in my image

Identifies where neighbouring pixels have contrasting values. Where this is consistent along a line, this is detected as an edge. This can be useful for identifying the edge of geographic features such as lakes, coastlines, or field boundaries.

### Select bands

Choose the bands that you would like to be included.

### Suffix for new band

Choose the suffix for the new bands that will be created.

### Kernel

You can choose:

Here is an example using the Kirsch filter on Sentinel 2 NIR band:

Original NIR band

Edge detection output image

## Calculate focal statistics

This calculates various statistical properties of the pixels within the kernel, with most of the same options as Smooth my image. While the Smooth my image calculates only the mean value, this option allows you to calculate multiple statistics:

**Median**: selects the middle value**Mean**: creates an average from each value**Sum**: calculates the total of all the values**Min**: selects the minimum value**Max**: selects the maximum value**Count**: Counts every pixel that has a value (parts of an image that have been masked out won’t have a value)

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Feedback sent

We appreciate your effort and will try to fix the article