> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SmoothImage Method of the ImageDocument Object

This method allows you to smooth the image by averaging over the square neighborhood. The method removes sharp differences from the image. It can be useful, for example, if the image contains some noise, i.e., random black dots or speckles. This method should not be used if the lines of letters on the image are thin.

<Warning>
  This method can be used for gray and color images only.
</Warning>

## Syntax

### C++

```cpp theme={null}
HRESULT SmoothImage(
  IRegion* Region,
  int      AreaSize
);
```

### C\#

```csharp theme={null}
void SmoothImage(
  IRegion Region,
  int    AreaSize
);
```

### Visual Basic .NET

```vb theme={null}
Sub SmoothImage( _
  Region As IRegion, _
  AreaSize As Integer _
)
```

## Parameters

**Region**

\[in] This parameter of the [Region](/fine-reader/engine/api-reference/supplementary-objects-and-methods/region) type specifies the set of rectangles to be smoothed. The coordinates of rectangles are related to the deskewed black-and-white page of the ImageDocument. This parameter may be 0. In this case, the whole image is smoothed.

**AreaSize**

\[in] This variable specifies the side of the square neighborhood. Must be an odd number greater than or equal to 3.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FineReader Engine functions](/fine-reader/engine/api-reference/return-codes).

## Remarks

* This method smoothes the [color](/fine-reader/engine/guided-tour/advanced-techniques/working-with-images#color) image plane of the [ImageDocument](/fine-reader/engine/api-reference/image-related-objects/imagedocument). All the other pages are deleted from the ImageDocument. They will be created upon demand.
* This method does not report events to the listeners attached to the IConnectionPointContainer interface of the ImageDocument object.

## See also

[ImageDocument](/fine-reader/engine/api-reference/image-related-objects/imagedocument)
