Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

prapi::GlobalPeakDetector< T > Class Template Reference

#include <PeakDetector.h>

Inheritance diagram for prapi::GlobalPeakDetector< T >:

Object List of all members.

Detailed Description

template<class T>
class prapi::GlobalPeakDetector< T >

GlobalPeakDetector is a class for detecting peaks in images, or in transform domains, like the Hough transform.

The detection method is as follows. First, the input image is globally thresholded to produce a binary image (hence the name). Second, a binary opening operation is performed to reduce noise. Third, connected components are found. Finally, the found components are sorted according to their magnitude (the magnitude of the input image at the center of the mass of the component) and returned. The user can decide how many peaks are returned at most.


Public Methods

 GlobalPeakDetector (T threshold=0, int maxPeaks=10)
 Create a PeakDetector that binarizes input images using the given threshold.

void setOpenMaskRadius (unsigned int radius)
 Set the radius of the circular structuring element used to reduce noise.

unsigned int getOpenMaskRadius () const
 Get the radius of the structuring element used to reduce noise.

void setAutoThreshold (bool autoThreshold)
 Set automatic thresholding on.

void getAutoThreshold () const
 See if the automatic thresholding is on.

void setThreshold (T threshold)
 Set the threshold.

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.

util::List< util::Pair< T,
binary::Component > > 
detectPeaks (const util::Matrix< T > &mat) const throw (ImageTransformException&)
 Detect peaks in an image or transform domain.


Constructor & Destructor Documentation

template<class T>
prapi::GlobalPeakDetector< T >::GlobalPeakDetector   threshold = 0,
int    maxPeaks = 10
[inline]
 

Create a PeakDetector that binarizes input images using the given threshold.

The maximum number of peaks returned is given by the maxPeaks parameter, which defaults to ten.

Parameters:
threshold  global binarization threshold
maxPeaks  the maximum number of peaks to find. Non-positive number means all.


Member Function Documentation

template<class T>
util::List< util::Pair< T, binary::Component > > prapi::GlobalPeakDetector< T >::detectPeaks const util::Matrix< T > &    mat const throw (ImageTransformException&)
 

Detect peaks in an image or transform domain.

The result is a list of Pair objects that store the magnitude of the peak, and the properties of the binary connected component that forms the peak.

template<class T>
void prapi::GlobalPeakDetector< T >::setAutoThreshold bool    autoThreshold [inline]
 

Set automatic thresholding on.

If automatic thresholding is on, the input image is binarized with the mean of the image plus two times standard deviation.

template<class T>
void prapi::GlobalPeakDetector< T >::setOpenMaskRadius unsigned int    radius [inline]
 

Set the radius of the circular structuring element used to reduce noise.

In noise-free cases, this value can be set to zero, disabling the morphological opening. The size of the structuring element will be (radius*2+1)-by-(radius*2+1). The default value is one.


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