The Lee filter uses a least-squares approach to estimate the true signal strength of the center cell in the filter window from the measured value in that cell, the local mean brightness of all cells in the window, and a gain factor calculated from the local variance and the noise standard deviation. More...
#include <spatmod/imagefilterfocal.h>

Public Member Functions | |
| FILTER_FOCAL_LEE (STAGE *pSourceImage, bool TakeOwnershipSource, STAGE *pMaskImage, bool TakeOwnershipMask, UINT32 NumFocalRows, UINT32 NumFocalColumns, double AmountFilterPct=100.0) | |
| FILTER_FOCAL_LEE (STAGE *pSourceImage, bool TakeOwnershipSource, UINT32 NumFocalRows, UINT32 NumFocalColumns, double AmountFilterPct=100.0) | |
| virtual | ~FILTER_FOCAL_LEE () |
The Lee filter uses a least-squares approach to estimate the true signal strength of the center cell in the filter window from the measured value in that cell, the local mean brightness of all cells in the window, and a gain factor calculated from the local variance and the noise standard deviation.
The filter assumes a Gaussian (normal) distribution for the noise values, and calculates the local noise standard deviation for each filter window. The Lee filter calculation produces an output value close to the local mean for uniform areas, and a value close to the original input value in higher contrast regions. Most smoothing occurs in the more uniform areas, while edges and other fine detail is maintained.
| SPATMOD::IMAGE::FILTER_FOCAL_LEE::FILTER_FOCAL_LEE | ( | STAGE * | pSourceImage, | |
| bool | TakeOwnershipSource, | |||
| UINT32 | NumFocalRows, | |||
| UINT32 | NumFocalColumns, | |||
| double | AmountFilterPct = 100.0 | |||
| ) |
Constructor.
| pSourceImage | Source image stage | |
| TakeOwnershipSource | Filter takes ownership of source image | |
| NumFocalRows | Number of rows in processing window | |
| NumFocalColumns | Number of columns in processing window | |
| AmountFilterPct | Amount of filter to apply (percentage, 0-100) |
| SPATMOD::IMAGE::FILTER_FOCAL_LEE::FILTER_FOCAL_LEE | ( | STAGE * | pSourceImage, | |
| bool | TakeOwnershipSource, | |||
| STAGE * | pMaskImage, | |||
| bool | TakeOwnershipMask, | |||
| UINT32 | NumFocalRows, | |||
| UINT32 | NumFocalColumns, | |||
| double | AmountFilterPct = 100.0 | |||
| ) |
Constructor with mask to determine areas to filter.
| pSourceImage | Source image stage | |
| TakeOwnershipSource | Filter takes ownership of source image | |
| pMaskImage | Mask, must have single component sample | |
| TakeOwnershipMask | Filter takes ownership of mask stage and will delete when needed | |
| NumFocalRows | Number of rows in processing window | |
| NumFocalColumns | Number of columns in processing window | |
| AmountFilterPct | Amount of filter to apply (percentage, 0-100) |
| virtual SPATMOD::IMAGE::FILTER_FOCAL_LEE::~FILTER_FOCAL_LEE | ( | ) | [virtual] |
Destructor.
1.6.1