Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

pmPeaks.h File Reference


Detailed Description

The process of finding, measuring, and classifying astronomical sources on images is one of the critical tasks of the IPP or any astronomical software system.

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.

Author:
GLG, MHPCC
Version:
Revision
1.3
Name
rel12
Date:
Date
2006/06/03 01:02:08
Copyright 2004 Maui High Performance Computing Center, University of Hawaii

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

pmPeakpmPeakAlloc (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)


Enumeration Type Documentation

enum pmPeakType
 

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:

Enumerator:
PM_PEAK_LONE  Isolated peak.
PM_PEAK_EDGE  Peak on edge.
PM_PEAK_FLAT  Peak has equal-value neighbors.
PM_PEAK_UNDEF  Undefined.

Definition at line 32 of file pmPeaks.h.


Function Documentation

psList* pmCullPeaks psList *  peaks,
float  maxValue,
const psRegion  valid
 

pmCullPeaks()

Eliminate peaks from the psList that have a peak value above the given maximum, or fall outside the valid region.

Parameters:
peaks  The psList of peaks to be culled
maxValue  Cull peaks above this value
valid  Cull peaks otside this psRegion

psArray* pmFindImagePeaks const psImage *  image,
float  threshold
 

pmFindImagePeaks()

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.

Parameters:
image  The input image where peaks will be found (float)
threshold  Threshold above which to find a peak

psVector* pmFindVectorPeaks const psVector *  vector,
float  threshold
 

pmFindVectorPeaks()

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).

Parameters:
vector  The input vector (float)
threshold  Threshold above which to find a peak

bool pmIsPeak const psPtr  ptr  ) 
 

pmPeak* pmPeakAlloc int  x,
int  y,
float  counts,
pmPeakType  type
 

pmPeakAlloc()

Returns:
pmPeak* newly allocated pmPeak with all internal pointers set to NULL
Parameters:
x  Row-coordinate in image space
y  Col-coordinate in image space
counts  The value of the peak pixel
type  The type of peak pixel

int pmPeaksCompareAscend const void **  a,
const void **  b
 

int pmPeaksCompareDescend const void **  a,
const void **  b
 

psArray* pmPeaksSubset psArray *  peaks,
float  maxvalue,
const psRegion  valid
 

pmPeaksSubset()

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.

Parameters:
peaks  Add comment.
maxvalue  Add comment.
valid  Add comment.


Generated on Mon Jul 3 14:24:52 2006 for Pan-STARRS Module Library by  doxygen 1.4.4