NASA Astrobee Robot Software  Astrobee Version:
Flight software for the Astrobee robots operating inside the International Space Station.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
upm Namespace Reference

Classes

class  BAD
 

Functions

static void rectifyBoxes (const std::vector< BAD::BoxPairParams > &boxes_params, std::vector< BAD::BoxPairParams > &out_params, const cv::KeyPoint &kp, float scale_factor=1, const cv::Size &patch_size=cv::Size(32, 32))
 Rectifies the coordinates of the box pairs measurement functions with the keypoint location parameters. More...
 
static float computeBadResponse (const BAD::BoxPairParams &box_params, const cv::Mat &integral_img)
 Computes the Box Average Difference, measuring the difference of gray level in the two square regions. More...
 
static bool isKeypointInTheBorder (const cv::KeyPoint &kp, const cv::Size &img_size, const cv::Size &patch_size={32, 32}, float scale_factor=1)
 Function that determines if a keypoint is close to the image border. More...
 

Detailed Description

Function Documentation

◆ computeBadResponse()

static float upm::computeBadResponse ( const BAD::BoxPairParams box_params,
const cv::Mat &  integral_img 
)
inlinestatic

Computes the Box Average Difference, measuring the difference of gray level in the two square regions.

Parameters
box_paramsThe weak-learner parameter defining the size and locations of each box.
integral_imgThe integral image used to compute the average gray value in the square regions.
Returns
The difference of gray level in the two squares defined by box_params

◆ isKeypointInTheBorder()

static bool upm::isKeypointInTheBorder ( const cv::KeyPoint &  kp,
const cv::Size &  img_size,
const cv::Size &  patch_size = {32, 32},
float  scale_factor = 1 
)
inlinestatic

Function that determines if a keypoint is close to the image border.

Parameters
kpThe detected keypoint
img_sizeThe size of the image
patch_sizeThe size of the normalized patch where the measurement functions were learnt.
scale_factorA scale factor that magnifies the measurement functions w.r.t. the keypoint.
Returns
true if the keypoint is in the border, false otherwise

◆ rectifyBoxes()

static void upm::rectifyBoxes ( const std::vector< BAD::BoxPairParams > &  boxes_params,
std::vector< BAD::BoxPairParams > &  out_params,
const cv::KeyPoint &  kp,
float  scale_factor = 1,
const cv::Size &  patch_size = cv::Size(32, 32) 
)
inlinestatic

Rectifies the coordinates of the box pairs measurement functions with the keypoint location parameters.

Parameters
boxes_paramsThe input parameters defining the location of each pair of boxes inside the normalized (32x32) patch.
out_paramsThe output parameters, now the boxes are located in the full image.
kpThe keypoint defining the offset, rotation and scale to be applied
scale_factorA scale factor that magnifies the measurement functions w.r.t. the keypoint.
patch_sizeThe size of the normalized patch where the measurement functions were learnt.