Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

prapi::LocalPeakDetector Class Reference

#include <PeakDetector.h>

Inheritance diagram for prapi::LocalPeakDetector:

Object List of all members.

Detailed Description

As the name implies, LocalPeakDetector detects peaks local in nature.

Instead of the global thresholding in GlobalPeakDetector, this class uses Gaussian fit to find peaks. The width of the Gaussian function used in fitting can be determined by the user.


Public Types

typedef util::Pair< double,
graphics::Point< int > > 
Peak
 Local peaks are represented as Pair objects that store the local magnitude of the peak (how well the peak correlates with the Gaussian), and the x (column) and y (row) coordinates of the peak.


Public Methods

 LocalPeakDetector (double radius, double threshold=0, int peaks=10)
 Create a peak detector that detects peaks with the given "sharpness".

void setRadius (double radius)
 Set the "sharpness" of the peaks.

double getRadius () const
 Get the current peak radius.

void setThreshold (double threshold)
 Set the threshold.

double getThreshold () const
 Get the binarization threshold.

void setMaxPeaks (int peaks)
 Set the maximum number of peaks to return.

int getMaxPeaks () const
 Get the maximum number of peaks.

template<class T> util::List< PeakdetectPeaks (const util::Matrix< T > &mat) const throw (ImageTransformException&)
 Detect peaks in an image or transform domain.


Constructor & Destructor Documentation

prapi::LocalPeakDetector::LocalPeakDetector double    radius,
double    threshold = 0,
int    peaks = 10
 

Create a peak detector that detects peaks with the given "sharpness".

The smaller the peak radius, the sharper peaks are assumed. The radius parameter directly affects the size of the Gaussian mask used for fitting. The Gaussian is created so that at least 95% of its mass is within the given radius.

Parameters:
radius  the width of the peaks
threshold  correlation threshold. All peaks with a local correlation measure less than this value are discarded. The maximum correlation is 1.0. Note that correlation measures tend to decrease with mask size, i.e. peak radius.
maxPeaks  the maximum number of peaks to find. Non-positive number means all.


Member Function Documentation

template<class T>
util::List< LocalPeakDetector::Peak > prapi::LocalPeakDetector::detectPeaks const util::Matrix< T > &    mat const throw (ImageTransformException&)
 

Detect peaks in an image or transform domain.

The result is a list of


The documentation for this class was generated from the following files:
Documentation generated on 11.09.2003 with Doxygen.
The documentation is copyrighted material.
Copyright © Topi Mäenpää 2003. All rights reserved.