bazar
1.3.1
|
YAPE feature point detector. More...
#include <yape.h>
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. | |
void | save_image_of_detected_points (char *name, IplImage *image, keypoint *points, int points_nb) |
Save a color image with the detected points on the original image. Useful for visualisation... | |
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< keypoint > | keypoint_vector |
Protected Member Functions | |
void | reserve_tmp_arrays (void) |
int | get_local_maxima (IplImage *image, int R, float scale) |
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_table * | Dirs |
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 |
YAPE feature point detector.
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:
where:
image
is a pointer on a IplImage
structure from OpenCv. The type of the image should be IPL_DEPTH_8U
, with one channel; The lowest its value is, the finest are the detected points;points
is a array of keypoint s. It should be large enough to store all the detected points;maxNumberOfPoints
is the desired maximum number of detected points.radius
is a parameter for the point detection. Its value should be between 3 and 7, its default value is 7.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.
The saveImageOfDetectedPoints
function is useful to save an image of the detected points:
|
protected |
yape::yape | ( | int | width, |
int | height | ||
) |
|
inline |
Definition at line 101 of file yape.h.
References set_use_bins().
|
inline |
Subpixel. Can be activated or disactived (default) for monoscale detection. Always activated for multi-scale detection.
Definition at line 108 of file yape.h.
References set_use_subpixel().
int yape::detect | ( | IplImage * | image, |
keypoint * | points, | ||
int | max_point_number, | ||
IplImage * | smoothed_image = 0 |
||
) |
Definition at line 478 of file yape.cpp.
Referenced by static_detect().
|
inline |
Definition at line 102 of file yape.h.
References set_use_bins().
|
inline |
Definition at line 109 of file yape.h.
References set_use_subpixel().
|
protected |
|
inline |
Definition at line 131 of file yape.h.
References filtered_image.
|
protected |
Find local maximas in score image and append them to tmp_points.
Definition at line 684 of file yape.cpp.
References is_local_maxima(), keypoint::scale, keypoint::score, keypoint::u, keypoint::v, and yape_bin_size.
Referenced by pyr_yape::detect().
|
inline |
Definition at line 113 of file yape.h.
References minimal_neighbor_number.
|
inline |
|
protected |
Definition at line 97 of file yape.cpp.
References yape_max_radius.
|
protected |
Definition at line 253 of file yape.cpp.
References A_INF, A_NOT_INF, A_NOT_SUP, A_SUP, B0_INF, B0_NOT_INF, B0_NOT_SUP, B0_SUP, B1_EQUAL_B2_NOT_INF, B1_EQUAL_B2_NOT_SUP, B1_INF, B1_INF_B2_INF, B1_INF_B2_NOT_SUP, B1_INF_B2_SUP, B1_NOT_INF, B1_NOT_INF_B2_NOT_INF, B1_NOT_SUP, B1_NOT_SUP_B2_NOT_SUP, B1_SUP, B1_SUP_B2_INF, B1_SUP_B2_NOT_INF, B1_SUP_B2_SUP, B2_INF, B2_NOT_INF, B2_NOT_SUP, B2_SUP, GET_A, GET_B0, GET_B1, GET_B2, GOTO_END_NOT_AN_INTEREST_POINT, GOTO_STATE, and PUT_B2_IN_B1_AND_GET_B2.
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 518 of file yape.cpp.
Referenced by pyr_yape::detect().
|
protected |
Definition at line 126 of file yape.cpp.
Referenced by 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 573 of file yape.cpp.
Referenced by pyr_yape::detect().
|
protected |
Definition at line 110 of file yape.cpp.
References yape_bin_size, and yape_tmp_points_array_size.
Referenced by pyr_yape::detect().
void yape::save_image_of_detected_points | ( | char * | name, |
IplImage * | image, | ||
keypoint * | points, | ||
int | points_nb | ||
) |
Save a color image with the detected points on the original image. Useful for visualisation...
Reimplemented in pyr_yape.
Definition at line 180 of file yape.cpp.
References PyrImage::convCoordf(), mcvCircle(), mcvGrayToColor(), mcvRainbowColor(), and mcvSaveImage().
|
inline |
|
inline |
Definition at line 112 of file yape.h.
References minimal_neighbor_number.
void yape::set_radius | ( | int | radius | ) |
Definition at line 87 of file yape.cpp.
Referenced by static_detect().
void yape::set_tau | ( | int | tau | ) |
Definition at line 92 of file yape.cpp.
Referenced by static_detect().
|
inline |
Definition at line 103 of file yape.h.
References use_bins.
Referenced by activate_bins(), and disactivate_bins().
|
inline |
Definition at line 110 of file yape.h.
References use_subpixel.
Referenced by activate_subpixel(), and disactivate_subpixel().
|
static |
Static function for point detection. Slower but avoids an instantiation.
Definition at line 74 of file yape.cpp.
References detect(), set_radius(), and set_tau().
void yape::subpix_refine | ( | IplImage * | im, |
keypoint * | p | ||
) |
Definition at line 771 of file yape.cpp.
References fit_quadratic_2x2(), keypoint::score, keypoint::u, and keypoint::v.
Referenced by pyr_yape::detect().
|
inlineprotected |
|
protected |
Definition at line 174 of file yape.h.
Referenced by set_bins_number().
|
protected |
Definition at line 174 of file yape.h.
Referenced by set_bins_number().
|
protected |
|
protected |
Definition at line 164 of file yape.h.
Referenced by pyr_yape::pyr_yape(), pyr_yape::select_level(), and pyr_yape::~pyr_yape().
|
protected |
Definition at line 165 of file yape.h.
Referenced by pyr_yape::pyr_yape(), pyr_yape::select_level(), and pyr_yape::~pyr_yape().
|
protected |
Definition at line 180 of file yape.h.
Referenced by get_filtered_image().
|
protected |
Definition at line 146 of file yape.h.
Referenced by get_minimal_neighbor_number(), and set_minimal_neighbor_number().
|
protected |
Definition at line 155 of file yape.h.
Referenced by pyr_yape::detect(), get_radius(), pyr_yape::pyramidBlurDetect(), and pyr_yape::save_image_of_detected_points().
|
protected |
Definition at line 180 of file yape.h.
Referenced by get_scores_image(), pyr_yape::pyr_yape(), pyr_yape::select_level(), and pyr_yape::~pyr_yape().
|
protected |
|
protected |
Definition at line 172 of file yape.h.
Referenced by get_use_bins(), and set_use_bins().
|
protected |
Definition at line 177 of file yape.h.
Referenced by set_use_subpixel().