yape Class Reference

YAPE feature point detector. More...

#include <yape.h>

Inheritance diagram for yape:

Inheritance graph
[legend]
Collaboration diagram for yape:

Collaboration graph
[legend]

List of all members.

Classes

struct  dir_table

Public Member Functions

 yape (int width, int height)
 Constructor for detection in width x height images.
virtual ~yape ()
void set_radius (int radius)
int get_radius (void)
void set_tau (int tau)
int get_tau (void)
void activate_bins (void)
void disactivate_bins (void)
void set_use_bins (bool p_use_bins)
bool get_use_bins (void)
void set_bins_number (int nb_u, int nb_v)
void activate_subpixel (void)
 Subpixel. Can be activated or disactived (default) for monoscale detection. Always activated for multi-scale detection.
void disactivate_subpixel (void)
void set_use_subpixel (bool p_use_subpixel)
void set_minimal_neighbor_number (int p_minimal_neighbor_number)
int get_minimal_neighbor_number (void)
int detect (IplImage *image, keypoint *points, int max_point_number, IplImage *smoothed_image=0)
void raw_detect (IplImage *im)
 detect interest points and add them to tmp_points.
int pick_best_points (keypoint *points, unsigned int max_point_number)
 sort and select the max_point_number best features.
IplImage * get_scores_image (void)
 Return scores and filtered images, for debugging purposes.
IplImage * get_filtered_image (void)
void subpix_refine (IplImage *im, keypoint *p)

Static Public Member Functions

static int static_detect (IplImage *image, keypoint *points, int max_point_number, int radius=7, int tau=10)
 Static function for point detection. Slower but avoids an instantiation.

Protected Types

typedef std::vector< keypointkeypoint_vector

Protected Member Functions

void reserve_tmp_arrays (void)
int get_local_maxima (IplImage *image, int R, float scale)
 Find local maximas in score image and append them to tmp_points.
void perform_one_point (const unsigned char *I, const int x, short *Scores, const int Im, const int Ip, const short *dirs, const unsigned char opposite, const unsigned char dirs_nb)
bool double_check (IplImage *image, int x, int y, short *dirs, unsigned char dirs_nb)
bool third_check (const short *Sb, const int next_line)
void precompute_directions (IplImage *image, short *_Dirs, int *_Dirs_nb, int R)
void init_for_monoscale (void)

Protected Attributes

int minimal_neighbor_number
int width
int height
int radius
int tau
dir_tableDirs
int * Dirs_nb
keypoint_vector tmp_points
bool use_bins
keypoint_vector bins [10][10]
int bin_nb_u
int bin_nb_v
bool use_subpixel
IplImage * scores
IplImage * filtered_image
int stats_state [100]
int stats_iter [100]
int score
int a
int b
int A
int B0
int B1
int B2
int state
CvMat * H
CvMat * mg
CvMat * shift


Detailed Description

YAPE feature point detector.

Author:
Vincent Lepetit
Stands for Yet Another Point Extractor.

Usage:

You need OpenCV to use this code. Two different uses of the Yape class are possible:

1) The simplest way is to call the static function static_detect:

int N = yape::static_detect(image, points, maxNumberOfPoints[, radius]);

where:

The function returns the actual number of detected points.

2) Detection in a large number of images of same size:

If the detection should be performed on a large number of images of same size, you should first create an instance of the detector. The yape constructor performs some pre-computation and pre- memory allocation to save some computation time during the actual detection.

// Create an instance of Yape for detection in 640x480 images:
yape * pe = new yape(640, 480);

// The default value for the radius is 7. Use set_radius() to change it:
pe->set_radius(3);

// Call the function detect() exactly like the static_detect() function:
N[0] = pe->detect(images[0], points[0], 100);
N[1] = pe->detect(images[1], points[1], 100);
N[2] = pe->detect(images[2], points[2], 100);
N[3] = pe->detect(images[3], points[3], 100);
...

// Call the destructor:
delete pe;

Definition at line 86 of file yape.h.


Member Typedef Documentation

typedef std::vector<keypoint> yape::keypoint_vector [protected]

Definition at line 163 of file yape.h.


Constructor & Destructor Documentation

yape::yape ( int  width,
int  height 
)

Constructor for detection in width x height images.

Definition at line 46 of file yape.cpp.

References activate_bins(), disactivate_subpixel(), height, init_for_monoscale(), minimal_neighbor_number, radius, set_bins_number(), set_minimal_neighbor_number(), tau, and width.

Referenced by static_detect().

yape::~yape (  )  [virtual]

Definition at line 66 of file yape.cpp.

References Dirs, Dirs_nb, filtered_image, and scores.


Member Function Documentation

void yape::activate_bins ( void   )  [inline]

Definition at line 99 of file yape.h.

References set_use_bins().

Referenced by yape().

void yape::activate_subpixel ( void   )  [inline]

Subpixel. Can be activated or disactived (default) for monoscale detection. Always activated for multi-scale detection.

Definition at line 106 of file yape.h.

References set_use_subpixel().

int yape::detect ( IplImage *  image,
keypoint points,
int  max_point_number,
IplImage *  smoothed_image = 0 
)

void yape::disactivate_bins ( void   )  [inline]

Definition at line 100 of file yape.h.

References set_use_bins().

void yape::disactivate_subpixel ( void   )  [inline]

Definition at line 107 of file yape.h.

References set_use_subpixel().

Referenced by yape().

bool yape::double_check ( IplImage *  image,
int  x,
int  y,
short *  dirs,
unsigned char  dirs_nb 
) [protected]

Definition at line 181 of file yape.cpp.

References A, and tau.

IplImage* yape::get_filtered_image ( void   )  [inline]

Definition at line 126 of file yape.h.

References filtered_image.

int yape::get_local_maxima ( IplImage *  image,
int  R,
float  scale 
) [protected]

Find local maximas in score image and append them to tmp_points.

Returns:
the number of local maxima found.

Definition at line 674 of file yape.cpp.

References bin_nb_u, bin_nb_v, bins, is_local_maxima(), keypoint::scale, keypoint::score, scores, third_check(), tmp_points, keypoint::u, use_bins, keypoint::v, and yape_bin_size.

Referenced by pyr_yape::detect(), and detect().

int yape::get_minimal_neighbor_number ( void   )  [inline]

Definition at line 111 of file yape.h.

References minimal_neighbor_number.

int yape::get_radius ( void   )  [inline]

Definition at line 94 of file yape.h.

IplImage* yape::get_scores_image ( void   )  [inline]

Return scores and filtered images, for debugging purposes.

Definition at line 125 of file yape.h.

References scores.

int yape::get_tau ( void   )  [inline]

Definition at line 97 of file yape.h.

References tau.

bool yape::get_use_bins ( void   )  [inline]

Definition at line 102 of file yape.h.

References use_bins.

void yape::init_for_monoscale ( void   )  [protected]

Definition at line 97 of file yape.cpp.

References Dirs, Dirs_nb, filtered_image, height, precompute_directions(), scores, yape::dir_table::t, width, and yape_max_radius.

Referenced by yape().

void yape::perform_one_point ( const unsigned char *  I,
const int  x,
short *  Scores,
const int  Im,
const int  Ip,
const short *  dirs,
const unsigned char  opposite,
const unsigned char  dirs_nb 
) [protected]

int yape::pick_best_points ( keypoint points,
unsigned int  max_point_number 
)

sort and select the max_point_number best features.

This method sorts tmp_points and select the max_point_number best points, as long as the score is high enough.

Definition at line 503 of file yape.cpp.

References bin_nb_u, bin_nb_v, bins, mymin(), N, tmp_points, and use_bins.

Referenced by pyr_yape::detect(), and detect().

void yape::precompute_directions ( IplImage *  image,
short *  _Dirs,
int *  _Dirs_nb,
int  R 
) [protected]

Definition at line 127 of file yape.cpp.

Referenced by init_for_monoscale(), and pyr_yape::pyr_yape().

void yape::raw_detect ( IplImage *  im  ) 

detect interest points and add them to tmp_points.

Detect interest points, without filtering and without selecting best ones.

Just find them and add them to tmp_points. tmp_points is not cleared in this method.

Definition at line 558 of file yape.cpp.

References Dirs, Dirs_nb, perform_one_point(), radius, scores, yape::dir_table::t, and tau.

Referenced by pyr_yape::detect(), and detect().

void yape::reserve_tmp_arrays ( void   )  [protected]

Definition at line 111 of file yape.cpp.

References bin_nb_u, bin_nb_v, bins, tmp_points, use_bins, yape_bin_size, and yape_tmp_points_array_size.

Referenced by pyr_yape::detect(), and detect().

void yape::set_bins_number ( int  nb_u,
int  nb_v 
) [inline]

Definition at line 103 of file yape.h.

References bin_nb_u, and bin_nb_v.

Referenced by yape().

void yape::set_minimal_neighbor_number ( int  p_minimal_neighbor_number  )  [inline]

Definition at line 110 of file yape.h.

References minimal_neighbor_number.

Referenced by yape().

void yape::set_radius ( int  radius  ) 

Definition at line 87 of file yape.cpp.

References radius.

Referenced by kpt_tracker::kpt_tracker(), and static_detect().

void yape::set_tau ( int  tau  ) 

Definition at line 92 of file yape.cpp.

References tau.

Referenced by static_detect().

void yape::set_use_bins ( bool  p_use_bins  )  [inline]

Definition at line 101 of file yape.h.

References use_bins.

Referenced by activate_bins(), and disactivate_bins().

void yape::set_use_subpixel ( bool  p_use_subpixel  )  [inline]

Definition at line 108 of file yape.h.

References use_subpixel.

Referenced by activate_subpixel(), and disactivate_subpixel().

int yape::static_detect ( IplImage *  image,
keypoint points,
int  max_point_number,
int  radius = 7,
int  tau = 10 
) [static]

Static function for point detection. Slower but avoids an instantiation.

Definition at line 74 of file yape.cpp.

References detect(), set_radius(), set_tau(), and yape().

void yape::subpix_refine ( IplImage *  im,
keypoint p 
)

bool yape::third_check ( const short *  Sb,
const int  next_line 
) [inline, protected]

Definition at line 607 of file yape.cpp.

References E, minimal_neighbor_number, N, S, and W.

Referenced by get_local_maxima().


Member Data Documentation

int yape::A [protected]

Definition at line 183 of file yape.h.

Referenced by double_check(), and perform_one_point().

int yape::a [protected]

Definition at line 182 of file yape.h.

Referenced by perform_one_point().

int yape::b [protected]

Definition at line 182 of file yape.h.

Referenced by perform_one_point().

int yape::B0 [protected]

Definition at line 183 of file yape.h.

Referenced by perform_one_point().

int yape::B1 [protected]

Definition at line 183 of file yape.h.

Referenced by perform_one_point().

int yape::B2 [protected]

Definition at line 183 of file yape.h.

Referenced by perform_one_point().

int yape::bin_nb_u [protected]

Definition at line 169 of file yape.h.

Referenced by get_local_maxima(), pick_best_points(), reserve_tmp_arrays(), and set_bins_number().

int yape::bin_nb_v [protected]

Definition at line 169 of file yape.h.

Referenced by get_local_maxima(), pick_best_points(), reserve_tmp_arrays(), and set_bins_number().

keypoint_vector yape::bins[10][10] [protected]

Definition at line 168 of file yape.h.

Referenced by get_local_maxima(), pick_best_points(), and reserve_tmp_arrays().

dir_table* yape::Dirs [protected]

int* yape::Dirs_nb [protected]

IplImage * yape::filtered_image [protected]

Definition at line 175 of file yape.h.

Referenced by detect(), get_filtered_image(), init_for_monoscale(), and ~yape().

CvMat* yape::H [protected]

Definition at line 186 of file yape.h.

int yape::height [protected]

Definition at line 147 of file yape.h.

Referenced by init_for_monoscale(), and yape().

CvMat* yape::mg [protected]

Definition at line 187 of file yape.h.

int yape::radius [protected]

int yape::score [protected]

Definition at line 181 of file yape.h.

Referenced by perform_one_point(), and subpix_refine().

IplImage* yape::scores [protected]

CvMat* yape::shift [protected]

Definition at line 188 of file yape.h.

int yape::state [protected]

Definition at line 184 of file yape.h.

Referenced by perform_one_point().

int yape::stats_iter[100] [protected]

Definition at line 178 of file yape.h.

int yape::stats_state[100] [protected]

Definition at line 178 of file yape.h.

int yape::tau [protected]

Definition at line 153 of file yape.h.

Referenced by double_check(), get_tau(), raw_detect(), set_tau(), and yape().

Definition at line 164 of file yape.h.

Referenced by get_local_maxima(), pick_best_points(), and reserve_tmp_arrays().

bool yape::use_bins [protected]

bool yape::use_subpixel [protected]

Definition at line 172 of file yape.h.

Referenced by detect(), and set_use_subpixel().

int yape::width [protected]

Definition at line 147 of file yape.h.

Referenced by init_for_monoscale(), and yape().


The documentation for this class was generated from the following files:

Generated on Tue Mar 30 15:53:26 2010 for Polyora by  doxygen 1.5.9