Functions
contrib/mul/vimt/algo/vimt_find_peaks.h File Reference

Find peaks in image. More...

#include <vimt/vimt_image_2d_of.h>
#include <vgl/vgl_point_2d.h>

Go to the source code of this file.

Functions

template<class T >
bool vimt_is_peak_3x3 (const T *im, vcl_ptrdiff_t i_step, vcl_ptrdiff_t j_step)
 True if pixel at *im is strictly above 8 neighbours.
template<class T >
bool vimt_is_peak (const T *im, int radius, vcl_ptrdiff_t i_step, vcl_ptrdiff_t j_step)
 True if pixel at *im is strictly above its neighbours in a 2*radius+1 neighbourhood.
template<class T >
void vimt_find_image_peaks_3x3 (vcl_vector< vgl_point_2d< unsigned > > &peaks, const vil_image_view< T > &image, unsigned plane=0, bool clear_list=true)
 Return image co-ordinates of all points in image strictly above their 8 neighbours.
template<class T >
void vimt_find_image_peaks_3x3 (vcl_vector< vgl_point_2d< unsigned > > &peaks, vcl_vector< T > &peak_value, const vil_image_view< T > &image, unsigned plane=0, bool clear_list=true)
 Return image co-ordinates of all points in image strictly above their 8 neighbours.
template<class T >
void vimt_find_image_peaks (vcl_vector< vgl_point_2d< unsigned > > &peaks, vcl_vector< T > &peak_value, const vil_image_view< T > &image, unsigned radius=1, unsigned plane=0, bool clear_list=true)
 Return image co-ordinates of all points in image strictly above their neighbours.
template<class T >
void vimt_find_image_peaks (vcl_vector< vgl_point_2d< unsigned > > &peaks, vcl_vector< T > &peak_value, const vil_image_view< T > &image, T thresh, unsigned radius=1, unsigned plane=0, bool clear_list=true)
 Return image co-ordinates of all points in image strictly above their neighbours.
template<class T >
void vimt_find_world_peaks_3x3 (vcl_vector< vgl_point_2d< double > > &peaks, const vimt_image_2d_of< T > &image, unsigned plane=0, bool clear_list=true)
 Return world co-ordinates of all points in image strictly above their 8 neighbours.
template<class T >
void vimt_find_world_peaks_3x3 (vcl_vector< vgl_point_2d< double > > &peak_pos, vcl_vector< T > &peak_value, const vimt_image_2d_of< T > &image, unsigned plane=0, bool clear_list=true)
 Return world co-ordinates of all points in image strictly above their 8 neighbours.
template<class T >
vgl_point_2d< unsigned > vimt_find_max (const vil_image_view< T > &im, unsigned plane=0)
 Return image co-ordinates of maximum value in image.
template<class T >
vgl_point_2d< double > vimt_find_max (const vimt_image_2d_of< T > &image, unsigned plane=0)
 Return world co-ordinates of maximum value in image.

Detailed Description

Find peaks in image.

Author:
Tim Cootes, VP (Sept03)

Definition in file vimt_find_peaks.h.


Function Documentation

template<class T >
void vimt_find_image_peaks ( vcl_vector< vgl_point_2d< unsigned > > &  peaks,
vcl_vector< T > &  peak_value,
const vil_image_view< T > &  image,
unsigned  radius = 1,
unsigned  plane = 0,
bool  clear_list = true 
) [inline]

Return image co-ordinates of all points in image strictly above their neighbours.

In a 2*radius+1 x 2*radius+1 neighbourhood of pixels (e.g. r=2 equivalent to 5x5; default: r=1)

Parameters:
peak_value,:Value at peak
clear_list,:If true (the default) then empty list before adding new examples

Definition at line 89 of file vimt_find_peaks.h.

template<class T >
void vimt_find_image_peaks ( vcl_vector< vgl_point_2d< unsigned > > &  peaks,
vcl_vector< T > &  peak_value,
const vil_image_view< T > &  image,
thresh,
unsigned  radius = 1,
unsigned  plane = 0,
bool  clear_list = true 
) [inline]

Return image co-ordinates of all points in image strictly above their neighbours.

In a 2*radius+1 x 2*radius+1 neighbourhood of pixels (e.g. r=2 equivalent to 5x5; default: r=1) Additionally, only peaks of the value higher than threshold (thresh) are returned.

Parameters:
peak_value,:Value at peak
clear_list,:If true (the default) then empty list before adding new examples

Definition at line 117 of file vimt_find_peaks.h.

template<class T >
void vimt_find_image_peaks_3x3 ( vcl_vector< vgl_point_2d< unsigned > > &  peaks,
const vil_image_view< T > &  image,
unsigned  plane = 0,
bool  clear_list = true 
) [inline]

Return image co-ordinates of all points in image strictly above their 8 neighbours.

Parameters:
clear_list,:If true (the default) then empty list before adding new examples

Definition at line 43 of file vimt_find_peaks.h.

template<class T >
void vimt_find_image_peaks_3x3 ( vcl_vector< vgl_point_2d< unsigned > > &  peaks,
vcl_vector< T > &  peak_value,
const vil_image_view< T > &  image,
unsigned  plane = 0,
bool  clear_list = true 
) [inline]

Return image co-ordinates of all points in image strictly above their 8 neighbours.

Parameters:
peak_value,:Value at peak
clear_list,:If true (the default) then empty list before adding new examples

Definition at line 63 of file vimt_find_peaks.h.

template<class T >
vgl_point_2d<unsigned> vimt_find_max ( const vil_image_view< T > &  im,
unsigned  plane = 0 
) [inline]

Return image co-ordinates of maximum value in image.

(Or first one found if multiple equivalent maxima)

Definition at line 198 of file vimt_find_peaks.h.

template<class T >
vgl_point_2d<double> vimt_find_max ( const vimt_image_2d_of< T > &  image,
unsigned  plane = 0 
) [inline]

Return world co-ordinates of maximum value in image.

(Or first one found if multiple equivalent maxima)

Definition at line 222 of file vimt_find_peaks.h.

template<class T >
void vimt_find_world_peaks_3x3 ( vcl_vector< vgl_point_2d< double > > &  peaks,
const vimt_image_2d_of< T > &  image,
unsigned  plane = 0,
bool  clear_list = true 
) [inline]

Return world co-ordinates of all points in image strictly above their 8 neighbours.

Parameters:
clear_list,:If true (the default) then empty list before adding new examples

Definition at line 148 of file vimt_find_peaks.h.

template<class T >
void vimt_find_world_peaks_3x3 ( vcl_vector< vgl_point_2d< double > > &  peak_pos,
vcl_vector< T > &  peak_value,
const vimt_image_2d_of< T > &  image,
unsigned  plane = 0,
bool  clear_list = true 
) [inline]

Return world co-ordinates of all points in image strictly above their 8 neighbours.

Parameters:
peak_pos,:Position of each peak
peak_value,:Value at peak
clear_list,:If true (the default) then empty list before adding new examples

Definition at line 171 of file vimt_find_peaks.h.

template<class T >
bool vimt_is_peak ( const T *  im,
int  radius,
vcl_ptrdiff_t  i_step,
vcl_ptrdiff_t  j_step 
) [inline]

True if pixel at *im is strictly above its neighbours in a 2*radius+1 neighbourhood.

Definition at line 29 of file vimt_find_peaks.h.

template<class T >
bool vimt_is_peak_3x3 ( const T *  im,
vcl_ptrdiff_t  i_step,
vcl_ptrdiff_t  j_step 
) [inline]

True if pixel at *im is strictly above 8 neighbours.

Definition at line 14 of file vimt_find_peaks.h.