Public Member Functions | Private Attributes
Target Class Reference

Provide tools to track the presence of a target. More...

#include <target.h>

List of all members.

Public Member Functions

bool detect (cv::Mat cam_descriptors, std::vector< cv::KeyPoint > &cam_keypoints, std::vector< cv::DMatch > &good_matches, std::vector< int > &idxs_to_remove, std::vector< cv::Point2f > &target_coord)
void draw (cv::Mat cam_img, std::vector< cv::KeyPoint > cam_keypoints, std::vector< cv::DMatch > good_matches, cv::Mat &img_matches)
bool init (const std::string relative_path)
 initializer
void position (std::vector< cv::KeyPoint > cam_keypoints, std::vector< cv::DMatch > good_matches, std::vector< cv::Point2f > &coord)
 This method computes the position of the target on the camera image.
 Target ()
 Constructor.
 ~Target ()
 Destructor.

Private Attributes

std::vector< cv::Point2f > centerAndCorners
 target keypoints descriptors
cv::Mat descriptors
 keypoints detected on the target picture
cv::Mat image
std::vector< cv::KeyPoint > keypoints
 Picture of the target as read at $TARGET_RELPATH$.
cv::FlannBasedMatcher matcher

Detailed Description

Provide tools to track the presence of a target.

Definition at line 30 of file target.h.


Constructor & Destructor Documentation

Constructor.

wrapper object to the FLANN library to perform matching with the video pictures

Definition at line 19 of file target.cpp.

Destructor.

Definition at line 26 of file target.cpp.


Member Function Documentation

bool Target::detect ( cv::Mat  cam_descriptors,
std::vector< cv::KeyPoint > &  cam_keypoints,
std::vector< cv::DMatch > &  good_matches,
std::vector< int > &  idxs_to_remove,
std::vector< cv::Point2f > &  target_coord 
)

This method detects the target in a given picture

Parameters:
[in]cam_descriptorsThe desciptors of keypoints in camera picture
[in]cam_keypointsThe coordinates of keypoints in camera picture
[out]good_matchesThe good matches between the target picture and the camera picture, in OpenCV format
[out]idxs_to_removeA list of indexes of keypoints on the target
[out]target_coordThe coordinates if the target is detected
[in]pose(#ifdef DEBUG_PROJECTION) Pose of the drone estimated with
[in]image_cam(#ifdef DEBUG_TARGET) image matrix (OpenCV format)
Returns:
true if the target is detected

Definition at line 75 of file target.cpp.

void Target::draw ( cv::Mat  cam_img,
std::vector< cv::KeyPoint >  cam_keypoints,
std::vector< cv::DMatch >  good_matches,
cv::Mat &  img_matches 
)

This method draws a green frame to indicate the detected target

Parameters:
[in]cam_imgimage matrix (OpenCV format)

Definition at line 230 of file target.cpp.

bool Target::init ( const std::string  relative_path)

initializer

Definition at line 30 of file target.cpp.

void Target::position ( std::vector< cv::KeyPoint >  cam_keypoints,
std::vector< cv::DMatch >  good_matches,
std::vector< cv::Point2f > &  coord 
)

This method computes the position of the target on the camera image.

Definition at line 273 of file target.cpp.


Member Data Documentation

std::vector< cv::Point2f > Target::centerAndCorners [private]

target keypoints descriptors

Definition at line 36 of file target.h.

cv::Mat Target::descriptors [private]

keypoints detected on the target picture

Definition at line 35 of file target.h.

cv::Mat Target::image [private]

Definition at line 33 of file target.h.

std::vector< cv::KeyPoint > Target::keypoints [private]

Picture of the target as read at $TARGET_RELPATH$.

Definition at line 34 of file target.h.

cv::FlannBasedMatcher Target::matcher [private]

position of the center and the corners of the target

Definition at line 38 of file target.h.


The documentation for this class was generated from the following files:


ucl_drone
Author(s): dronesinma
autogenerated on Sat Jun 8 2019 20:51:53