ov_core::Grider_DOG class

Does Difference of Gaussian (DoG) in a grid pattern.

Contents

This does "Difference of Gaussian" detection in a grid pattern to try to get good features. We then pick the top features in each grid, and return the top features collected over the entire image. This class hasn't been tested that much, as we normally use the Grider_FAST class instead.

Public static functions

static auto compare_response(cv::KeyPoint first, cv::KeyPoint second) -> bool
Compare keypoints based on their response value.
static void detect(const cv::Mat& img, std::vector<cv::KeyPoint>& pts, int ksize, float sigma_small, float sigma_big, float threshold)
For a given small image region this will do the Difference of Gaussian (DOG) detection.
static void perform_griding(const cv::Mat& img, std::vector<cv::KeyPoint>& pts, int num_features, int grid_x, int grid_y, int ksize, float sigma_small, float sigma_big, float threshold)
This function will perform grid extraction using Difference of Gaussian (DOG)

Function documentation

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

Compare keypoints based on their response value.

Parameters
first First keypoint
second Second keypoint

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

static void ov_core::Grider_DOG::detect(const cv::Mat& img, std::vector<cv::KeyPoint>& pts, int ksize, float sigma_small, float sigma_big, float threshold)

For a given small image region this will do the Difference of Gaussian (DOG) detection.

Will return the vector of keypoints with the averaged response for that given UV. See: https://github.com/jrdi/opencv-examples/blob/master/dog/main.cpp

static void ov_core::Grider_DOG::perform_griding(const cv::Mat& img, std::vector<cv::KeyPoint>& pts, int num_features, int grid_x, int grid_y, int ksize, float sigma_small, float sigma_big, float threshold)

This function will perform grid extraction using Difference of Gaussian (DOG)

Parameters
img Image we will do FAST extraction on
pts vector of extracted points we will return
num_features max number of features we want to extract
grid_x size of grid in the x-direction / u-direction
grid_y size of grid in the y-direction / v-direction
ksize kernel size
sigma_small small gaussian sigma
sigma_big big gaussian sigma
threshold response threshold

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.