Public Member Functions | Private Member Functions | Private Attributes
fake_object_recognition::Rating Class Reference

This class is used to rate an object's pose based on the current camera position. More...

#include <rating.h>

List of all members.

Public Member Functions

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.
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.
 Rating (double fovx, double fovy, double ncp, double fcp)
 The constructor of the class.

Private Member Functions

double getAngleRating (const geometry_msgs::Pose &object_pose, bool direction)
 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.
bool getBBRating (const std::array< geometry_msgs::Point, 8 > &bounding_box)
 Returns the amount of points of the bounding box inside the frustum divided by the amount of all points.
double getDistanceRating (const geometry_msgs::Pose &object_pose)
 Returns a rating of an object's pose based on the distance to the camera.
double getNormalRating (const geometry_msgs::Pose &object_pose, const std::vector< geometry_msgs::Point > &normals)
 Returns a rating for the angle between sight vector to object and object's normal. 1.0 is best, 0.0 worst.

Private Attributes

const Eigen::Vector3d camera_orientation_
double fcp_
double fovx_
double fovy_
double ncp_

Detailed Description

This class is used to rate an object's pose based on the current camera position.

Definition at line 30 of file rating.h.


Constructor & Destructor Documentation

fake_object_recognition::Rating::Rating ( double  fovx,
double  fovy,
double  ncp,
double  fcp 
)

The constructor of the class.

Parameters:
fovxThe field of view in x-direction
fovyThe field of view in y-direction
ncpThe distance to the near-clip-plane
fcpThe distance to the far-clip-plane

Definition at line 30 of file rating.cpp.


Member Function Documentation

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_poseThe pose of the object
directionTrue == 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_boxBounding 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.

Returns a rating of an object's pose based on the distance to the camera.

Parameters:
object_poseThe pose of the object
Returns:
The calculated rating

Definition at line 49 of file rating.cpp.

double fake_object_recognition::Rating::getNormalRating ( const geometry_msgs::Pose object_pose,
const std::vector< geometry_msgs::Point > &  normals 
) [private]

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_posePose of the object relative to camera.
normalsList of normals of the object.
Returns:

Definition at line 126 of file rating.cpp.

bool fake_object_recognition::Rating::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.

If not all of the object's bounding box corner points are inside the frustum, returns false.

Parameters:
object_posePose of the object in the camera frame.
bounding_boxBounding box corner points.
normalsNormals. If vector ist empty, normals are not considered in rating.
thresholdThe 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:
poseThe given object's pose
threshold_dThe minimum distance rating value this pose needs to have to be visible.
threshold_xThe minimum angle rating value in azimut this pose needs to have to be visible.
threshold_yThe 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.


Member Data Documentation

The orientaton of the visual axis of the camera

Definition at line 45 of file rating.h.

The distance to the far-clip-plane of the used camera

Definition at line 42 of file rating.h.

The field of view in x-direction of the camera

Definition at line 33 of file rating.h.

The field of view in y-direction of the camera

Definition at line 36 of file rating.h.

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:


asr_fake_object_recognition
Author(s): Allgeyer Tobias, Aumann Florian, Borella Jocelyn, Meißner Pascal, Qattan Mohamad
autogenerated on Sat Jun 8 2019 19:15:45