Static Public Member Functions | List of all members
ov_core::Grider_GRID Class Reference

Extracts FAST features in a grid pattern. More...

#include <Grider_GRID.h>

Static Public Member Functions

static bool compare_response (cv::KeyPoint first, cv::KeyPoint second)
 Compare keypoints based on their response value. More...
 
static void perform_griding (const cv::Mat &img, const cv::Mat &mask, const std::vector< std::pair< int, int >> &valid_locs, std::vector< cv::KeyPoint > &pts, int num_features, int grid_x, int grid_y, int threshold, bool nonmaxSuppression)
 This function will perform grid extraction using FAST. More...
 

Detailed Description

Extracts FAST features in a grid pattern.

As compared to just extracting fast features over the entire image, we want to have as uniform of extractions as possible over the image plane. Thus we split the image into a bunch of small grids, and extract points in each. We then pick enough top points in each grid so that we have the total number of desired points.

Definition at line 46 of file Grider_GRID.h.

Member Function Documentation

◆ compare_response()

static bool ov_core::Grider_GRID::compare_response ( cv::KeyPoint  first,
cv::KeyPoint  second 
)
inlinestatic

Compare keypoints based on their response value.

Parameters
firstFirst keypoint
secondSecond keypoint

We want to have the keypoints with the highest values! See: https://stackoverflow.com/a/10910921

Definition at line 57 of file Grider_GRID.h.

◆ perform_griding()

static void ov_core::Grider_GRID::perform_griding ( const cv::Mat &  img,
const cv::Mat &  mask,
const std::vector< std::pair< int, int >> &  valid_locs,
std::vector< cv::KeyPoint > &  pts,
int  num_features,
int  grid_x,
int  grid_y,
int  threshold,
bool  nonmaxSuppression 
)
inlinestatic

This function will perform grid extraction using FAST.

Parameters
imgImage we will do FAST extraction on
maskRegion of the image we do not want to extract features in (255 = do not detect features)
valid_locsValid 2d grid locations we will extract in (instead of the whole image)
ptsvector of extracted points we will return
num_featuresmax number of features we want to extract
grid_xsize of grid in the x-direction / u-direction
grid_ysize of grid in the y-direction / v-direction
thresholdFAST threshold paramter (10 is a good value normally)
nonmaxSuppressionif FAST should perform non-max suppression (true normally)

Given a specified grid size, this will try to extract fast features from each grid. It will then return the best from each grid in the return vector.

Definition at line 74 of file Grider_GRID.h.


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


ov_core
Author(s): Patrick Geneva , Kevin Eckenhoff , Guoquan Huang
autogenerated on Mon Dec 16 2024 03:06:46