NASA Astrobee Robot Software
0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
|
#include <BAD.h>
Classes | |
struct | BoxPairParams |
Public Types | |
enum | BadSize { SIZE_512_BITS = 100, SIZE_256_BITS = 101 } |
Descriptor number of bits, each bit is a weak-descriptor. The user can choose between 512 or 256 bits. More... | |
Public Member Functions | |
BAD (float scale_factor=1.0f, BadSize n_bits=SIZE_512_BITS) | |
void | compute (cv::InputArray image, CV_OUT CV_IN_OUT std::vector< cv::KeyPoint > &keypoints, cv::OutputArray descriptors) override |
Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant). More... | |
int | descriptorSize () const override |
int | descriptorType () const override |
int | defaultNorm () const override |
bool | empty () const override |
cv::String | getDefaultName () const override |
Static Public Member Functions | |
static cv::Ptr< BAD > | create (float scale_factor=1.0f, BadSize n_bits=SIZE_512_BITS) |
Creates the BAD descriptor. More... | |
Protected Member Functions | |
void | computeBAD (const cv::Mat &integral_img, const std::vector< cv::KeyPoint > &keypoints, cv::Mat &descriptors) |
Protected Attributes | |
std::vector< float > | thresholds_ |
std::vector< BoxPairParams > | box_params_ |
float | scale_factor_ = 1 |
cv::Size | patch_size_ = {32, 32} |
Implementation of the Box Average Difference (BAD) descriptor. The method uses features computed from the difference of the average gray values of two boxes in the patch.
Each pair of boxes is represented with a BoxPairParams struct. After obtaining the feature from them, the i'th feature is thresholded with thresholds_[i], producing the binary weak-descriptor.
enum upm::BAD::BadSize |
|
explicit |
scale_factor | Adjust the sampling window around detected keypoints:
|
n_bits | Determine the number of bits in the descriptor. Should be either BAD::SIZE_512_BITS or BAD::SIZE_256_BITS. |
|
override |
Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant).
image | Image. |
keypoints | Input collection of keypoints. Keypoints for which a descriptor cannot be computed are removed. Sometimes new keypoints can be added, for example: SIFT duplicates keypoint with several dominant orientations (for each orientation). |
descriptors | Computed descriptors. In the second variant of the method descriptors[i] are descriptors computed for a keypoints[i]. Row j is the keypoints (or keypoints[i]) is the descriptor for keypoint j-th keypoint. |
|
protected |
|
inlinestatic |
Creates the BAD descriptor.
scale_factor | Adjust the sampling window around detected keypoints:
|
n_bits |
|
inlineoverride |
|
inlineoverride |
|
inlineoverride |
|
inlineoverride |
|
inlineoverride |
|
protected |
|
protected |
|
protected |
|
protected |