This file will define structures and functions related to the task of source detection and measurement. The elements defined in this section are generally low-level components which can be connected together to construct a complete object measurement suite.
Definition in file pmPeaks.h.
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Data Structures | |
| struct | pmPeak |
| pmPeak data structure More... | |
Enumerations | |
| enum | pmPeakType { PM_PEAK_LONE, PM_PEAK_EDGE, PM_PEAK_FLAT, PM_PEAK_UNDEF } |
| pmPeakType More... | |
Functions | |
| pmPeak * | pmPeakAlloc (int x, int y, float counts, pmPeakType type) |
| pmPeakAlloc() | |
| bool | pmIsPeak (const psPtr ptr) |
| psVector * | pmFindVectorPeaks (const psVector *vector, float threshold) |
| pmFindVectorPeaks() | |
| psArray * | pmFindImagePeaks (const psImage *image, float threshold) |
| pmFindImagePeaks() | |
| psList * | pmCullPeaks (psList *peaks, float maxValue, const psRegion valid) |
| pmCullPeaks() | |
| psArray * | pmPeaksSubset (psArray *peaks, float maxvalue, const psRegion valid) |
| pmPeaksSubset() | |
| int | pmPeaksCompareAscend (const void **a, const void **b) |
| int | pmPeaksCompareDescend (const void **a, const void **b) |
|
|
pmPeakType A peak pixel may have several features which may be determined when the peak is found or measured. These are specified by the pmPeakType enum. PM_PEAK_LONE represents a single pixel which is higher than its 8 immediate neighbors. The PM_PEAK_EDGE represents a peak pixel which touching the image edge. The PM_PEAK_FLAT represents a peak pixel which has more than a specific number of neighbors at the same value, within some tolarence: |
|
||||||||||||||||
|
Eliminate peaks from the psList that have a peak value above the given maximum, or fall outside the valid region.
|
|
||||||||||||
|
Find all local peaks in the given image above the given threshold. This function should find all row peaks using pmFindVectorPeaks, then test each row peak and exclude peaks which are not local peaks. A peak is a local peak if it has a higher value than all 8 neighbors. If the peak has the same value as its +y neighbor or +x neighbor, it is NOT a local peak. If any other neighbors have an equal value, the peak is considered a valid peak. Note two points: first, the +x neighbor condition is already enforced by pmFindVectorPeaks. Second, these rules have the effect of making flat-topped regions have single peaks at the (+x,+y) corner. When selecting the peaks, their type must also be set. The result of this function is an array of pmPeak entries.
|
|
||||||||||||
|
Find all local peaks in the given vector above the given threshold. A peak is defined as any element with a value greater than its two neighbors and with a value above the threshold. Two types of special cases must be addressed. Equal value elements: If an element has the same value as the following element, it is not considered a peak. If an element has the same value as the preceding element (but not the following), then it is considered a peak. Note that this rule (arbitrarily) identifies flat regions by their trailing edge. Edge cases: At start of the vector, the element must be higher than its neighbor. At the end of the vector, the element must be higher or equal to its neighbor. These two rules again places the peak associated with a flat region which touches the image edge at the image edge. The result of this function is a vector containing the coordinates (element number) of the detected peaks (type psU32).
|
|
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||||||
|
Create a new peaks array, removing certain types of peaks from the input array of peaks based on the given criteria. Peaks should be eliminated if they have a peak value above the given maximum value limit or if the fall outside the valid region. The result of the function is a new array with a reduced number of peaks.
|
1.4.4