This class is used to rate an object's pose based on the current camera position.
More...
#include <rating.h>
|
bool | rateBBandNormal (const geometry_msgs::Pose &object_pose, const std::array< geometry_msgs::Point, 8 > &bounding_box, const std::vector< geometry_msgs::Point > &normals, double threshold) |
| Rates an objects visibility based on its bounding box and its normals. More...
|
|
bool | ratePose (const geometry_msgs::Pose &pose, double threshold_d, double threshold_x, double threshold_y) |
| Return whether a pose is visible in the camera frustum based on the distance and angle rating. More...
|
|
| Rating (double fovx, double fovy, double ncp, double fcp) |
| The constructor of the class. More...
|
|
This class is used to rate an object's pose based on the current camera position.
Definition at line 30 of file rating.h.
fake_object_recognition::Rating::Rating |
( |
double |
fovx, |
|
|
double |
fovy, |
|
|
double |
ncp, |
|
|
double |
fcp |
|
) |
| |
The constructor of the class.
- Parameters
-
fovx | The field of view in x-direction |
fovy | The field of view in y-direction |
ncp | The distance to the near-clip-plane |
fcp | The distance to the far-clip-plane |
Definition at line 30 of file rating.cpp.
double fake_object_recognition::Rating::getAngleRating |
( |
const geometry_msgs::Pose & |
object_pose, |
|
|
bool |
direction |
|
) |
| |
|
private |
Returns a rating of an object's pose based on the (azimut or elevation) angle between the camera's visual axis and the vector from the camera to the object's position.
- Parameters
-
object_pose | The pose of the object |
direction | True == azimut, false == elevation. |
- Returns
- The calculated rating
Definition at line 64 of file rating.cpp.
bool fake_object_recognition::Rating::getBBRating |
( |
const std::array< geometry_msgs::Point, 8 > & |
bounding_box | ) |
|
|
private |
Returns the amount of points of the bounding box inside the frustum divided by the amount of all points.
- Parameters
-
bounding_box | Bounding Box, assumed (but momentarily not required) to be represented by its 8 corner points in the camera frame. |
- Returns
- whether all points are within the frustum
Definition at line 95 of file rating.cpp.
double fake_object_recognition::Rating::getDistanceRating |
( |
const geometry_msgs::Pose & |
object_pose | ) |
|
|
private |
Returns a rating of an object's pose based on the distance to the camera.
- Parameters
-
object_pose | The pose of the object |
- Returns
- The calculated rating
Definition at line 49 of file rating.cpp.
Returns a rating for the angle between sight vector to object and object's normal. 1.0 is best, 0.0 worst.
Looks for the normal that will produce the best rating and returns that rating.
- Parameters
-
object_pose | Pose of the object relative to camera. |
normals | List of normals of the object. |
- Returns
Definition at line 126 of file rating.cpp.
Rates an objects visibility based on its bounding box and its normals.
If not all of the object's bounding box corner points are inside the frustum, returns false.
- Parameters
-
object_pose | Pose of the object in the camera frame. |
bounding_box | Bounding box corner points. |
normals | Normals. If vector ist empty, normals are not considered in rating. |
threshold | The threshold above which a normal rating is accepted. |
- Returns
- True if the object is visible based on its rating, false otherwise.
Definition at line 159 of file rating.cpp.
bool fake_object_recognition::Rating::ratePose |
( |
const geometry_msgs::Pose & |
pose, |
|
|
double |
threshold_d, |
|
|
double |
threshold_x, |
|
|
double |
threshold_y |
|
) |
| |
Return whether a pose is visible in the camera frustum based on the distance and angle rating.
- Parameters
-
pose | The given object's pose |
threshold_d | The minimum distance rating value this pose needs to have to be visible. |
threshold_x | The minimum angle rating value in azimut this pose needs to have to be visible. |
threshold_y | The minimum angle rating value in elevation this pose needs to have to be visible. |
- Returns
- True if the object is visible based on the rating, false otherwise
Definition at line 37 of file rating.cpp.
const Eigen::Vector3d fake_object_recognition::Rating::camera_orientation_ |
|
private |
The orientaton of the visual axis of the camera
Definition at line 45 of file rating.h.
double fake_object_recognition::Rating::fcp_ |
|
private |
The distance to the far-clip-plane of the used camera
Definition at line 42 of file rating.h.
double fake_object_recognition::Rating::fovx_ |
|
private |
The field of view in x-direction of the camera
Definition at line 33 of file rating.h.
double fake_object_recognition::Rating::fovy_ |
|
private |
The field of view in y-direction of the camera
Definition at line 36 of file rating.h.
double fake_object_recognition::Rating::ncp_ |
|
private |
The distance to the near-clip-plane of the used camera
Definition at line 39 of file rating.h.
The documentation for this class was generated from the following files: