The Adaptive Mean P-Median filter (AMPM) is a variant of the P-Median filter that is designed to provide better smoothing in uniform regions while still preserving edges and line detail. More...
#include <spatmod/imagefilterfocal.h>

Public Member Functions | |
| FILTER_FOCAL_AMPM (STAGE *pSourceImage, bool TakeOwnershipSource, STAGE *pMaskImage, bool TakeOwnershipMask, STATSVALIDITY StatsValidity, double WeightParam, double SigmaParam, UINT32 NumFocalRows, UINT32 NumFocalColumns) | |
| FILTER_FOCAL_AMPM (STAGE *pSourceImage, bool TakeOwnershipSource, STATSVALIDITY StatsValidity, double WeightParam, double SigmaParam, UINT32 NumFocalRows, UINT32 NumFocalColumns) | |
| virtual | ~FILTER_FOCAL_AMPM () |
The Adaptive Mean P-Median filter (AMPM) is a variant of the P-Median filter that is designed to provide better smoothing in uniform regions while still preserving edges and line detail.
The filter first classifies the center cell in the filter window as belonging to either a uniform region or an edge region. The AMPM filter then applies the P-Median filter in regions containing edges, but uses a simple averaging filter in regions with relatively uniform values. The output of the AMPM filter in the edge regions is a user-controlled weighted average of the calculated P-Median filter value and the original center cell value; this weighting does not apply to the areas where simple averaging is performed.
| SPATMOD::IMAGE::FILTER_FOCAL_AMPM::FILTER_FOCAL_AMPM | ( | STAGE * | pSourceImage, | |
| bool | TakeOwnershipSource, | |||
| STATSVALIDITY | StatsValidity, | |||
| double | WeightParam, | |||
| double | SigmaParam, | |||
| UINT32 | NumFocalRows, | |||
| UINT32 | NumFocalColumns | |||
| ) |
Constructor.
| pSourceImage | Source image stage | |
| TakeOwnershipSource | Filter takes ownership of source image | |
| StatsValidity | How to compute image statisitcs used in filter (fastest should be used for display, exact for processing) | |
| WeightParam | User-controlled weighted average of the input raster value and the P-Median value | |
| SigmaParam | User-controlled weight applied to sigma | |
| NumFocalRows | Number of rows in processing window | |
| NumFocalColumns | Number of columns in processing window |
| SPATMOD::IMAGE::FILTER_FOCAL_AMPM::FILTER_FOCAL_AMPM | ( | STAGE * | pSourceImage, | |
| bool | TakeOwnershipSource, | |||
| STAGE * | pMaskImage, | |||
| bool | TakeOwnershipMask, | |||
| STATSVALIDITY | StatsValidity, | |||
| double | WeightParam, | |||
| double | SigmaParam, | |||
| UINT32 | NumFocalRows, | |||
| UINT32 | NumFocalColumns | |||
| ) |
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 | |
| StatsValidity | How to compute image statisitcs used in filter (fastest should be used for display, exact for processing) | |
| WeightParam | User-controlled weighted average of the input raster value and the P-Median value | |
| SigmaParam | User-controlled weight applied to sigma | |
| NumFocalRows | Number of rows in processing window | |
| NumFocalColumns | Number of columns in processing window |
| virtual SPATMOD::IMAGE::FILTER_FOCAL_AMPM::~FILTER_FOCAL_AMPM | ( | ) | [virtual] |
Destructor.
1.6.1