OKVIS ROS
|
A single camera frame equipped with keypoint detector / extractor. More...
#include <Frame.hpp>
Public Member Functions | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | Frame () |
a default constructor More... | |
Frame (const cv::Mat &image, std::shared_ptr< cameras::CameraBase > &cameraGeometry, std::shared_ptr< cv::FeatureDetector > &detector, std::shared_ptr< cv::DescriptorExtractor > &extractor) | |
A constructor that uses the image, specified geometry, detector and extractor. More... | |
virtual | ~Frame () |
A simple destructor. More... | |
void | setImage (const cv::Mat &image) |
Set the frame image;. More... | |
void | setGeometry (std::shared_ptr< const cameras::CameraBase > cameraGeometry) |
Set the geometry. More... | |
void | setDetector (std::shared_ptr< cv::FeatureDetector > detector) |
Set the detector. More... | |
void | setExtractor (std::shared_ptr< cv::DescriptorExtractor > extractor) |
Set the extractor. More... | |
const cv::Mat & | image () const |
Obtain the image. More... | |
std::shared_ptr< const cameras::CameraBase > | geometry () const |
get the base class geometry (will be slow to use) More... | |
template<class GEOMETRY_T > | |
std::shared_ptr< const GEOMETRY_T > | geometryAs () const |
Get the specific geometry (will be fast to use) More... | |
int | detect () |
Detect keypoints. This uses virtual function calls. That's a negligibly small overhead for many detections. More... | |
int | describe (const Eigen::Vector3d &extractionDirection=Eigen::Vector3d(0, 0, 1)) |
Describe keypoints. This uses virtual function calls. That's a negligibly small overhead for many detections. More... | |
template<class GEOMETRY_T > | |
int | describeAs (const Eigen::Vector3d &extractionDirection=Eigen::Vector3d(0, 0, 1)) |
Describe keypoints. This uses virtual function calls. That's a negligibly small overhead for many detections. More... | |
bool | getCvKeypoint (size_t keypointIdx, cv::KeyPoint &keypoint) const |
Access a specific keypoint in OpenCV format. More... | |
bool | getKeypoint (size_t keypointIdx, Eigen::Vector2d &keypoint) const |
Get a specific keypoint. More... | |
bool | getKeypointSize (size_t keypointIdx, double &keypointSize) const |
Get the size of a specific keypoint. More... | |
const unsigned char * | keypointDescriptor (size_t keypointIdx) |
Access the descriptor – CAUTION: high-speed version. More... | |
bool | setLandmarkId (size_t keypointIdx, uint64_t landmarkId) |
Set the landmark ID. More... | |
uint64_t | landmarkId (size_t keypointIdx) const |
Access the landmark ID. More... | |
bool | resetKeypoints (const std::vector< cv::KeyPoint > &keypoints) |
Provide keypoints externally. More... | |
bool | resetDescriptors (const cv::Mat &descriptors) |
provide descriptors externally More... | |
size_t | numKeypoints () const |
Get the number of keypoints. More... | |
Protected Attributes | |
cv::Mat | image_ |
the image as OpenCV's matrix More... | |
std::shared_ptr< const cameras::CameraBase > | cameraGeometry_ |
the camera geometry More... | |
std::shared_ptr < cv::FeatureDetector > | detector_ |
the detector More... | |
std::shared_ptr < cv::DescriptorExtractor > | extractor_ |
the extractor More... | |
std::vector< cv::KeyPoint > | keypoints_ |
we store keypoints using OpenCV's struct More... | |
cv::Mat | descriptors_ |
we store the descriptors using OpenCV's matrices More... | |
std::vector< uint64_t > | landmarkIds_ |
landmark Id, if associated – 0 otherwise More... | |
A single camera frame equipped with keypoint detector / extractor.
|
inline |
a default constructor
|
inline |
A constructor that uses the image, specified geometry, detector and extractor.
detector and extractor
[in] | image | The image. |
[in] | cameraGeometry | The camera geometry. |
[in] | detector | The detector to be used. |
[in] | extractor | The extractor to be used. |
|
inlinevirtual |
A simple destructor.
|
inline |
Describe keypoints. This uses virtual function calls. That's a negligibly small overhead for many detections.
extractionDirection | The extraction direction in camera frame |
That's a negligibly small overhead for many detections.
extractionDirection | the extraction direction in camera frame returns the number of detected points. |
|
inline |
Describe keypoints. This uses virtual function calls. That's a negligibly small overhead for many detections.
GEOMETRY_T | The type for the camera geometry requested. |
extractionDirection | the extraction direction in camera frame |
That's a negligibly small overhead for many detections.
extractionDirection | the extraction direction in camera frame returns the number of detected points. |
|
inline |
Detect keypoints. This uses virtual function calls. That's a negligibly small overhead for many detections.
That's a negligibly small overhead for many detections. returns the number of detected points.
|
inline |
get the base class geometry (will be slow to use)
|
inline |
Get the specific geometry (will be fast to use)
GEOMETRY_T | The type for the camera geometry requested. |
|
inline |
Access a specific keypoint in OpenCV format.
[in] | keypointIdx | The requested keypoint's index. |
[out] | keypoint | The requested keypoint. |
|
inline |
Get a specific keypoint.
[in] | keypointIdx | The requested keypoint's index. |
[out] | keypoint | The requested keypoint. |
|
inline |
Get the size of a specific keypoint.
[in] | keypointIdx | The requested keypoint's index. |
[out] | keypointSize | The requested keypoint's size. |
|
inline |
Obtain the image.
|
inline |
Access the descriptor – CAUTION: high-speed version.
returns NULL if out of bounds.
[in] | keypointIdx | The requested keypoint's index. |
|
inline |
Access the landmark ID.
[in] | keypointIdx | The requested keypoint's index. |
|
inline |
Get the number of keypoints.
|
inline |
provide descriptors externally
[in] | descriptors | A vector of descriptors. |
|
inline |
Provide keypoints externally.
[in] | keypoints | A vector of keyoints. |
|
inline |
Set the detector.
[in] | detector | The detector to be used. |
|
inline |
Set the extractor.
[in] | extractor | The extractor to be used. |
|
inline |
Set the geometry.
[in] | cameraGeometry | The camera geometry. |
|
inline |
Set the frame image;.
[in] | image | The image. |
|
inline |
Set the landmark ID.
[in] | keypointIdx | The requested keypoint's index. |
[in] | landmarkId | The landmark Id. |
|
protected |
the camera geometry
|
protected |
we store the descriptors using OpenCV's matrices
|
protected |
the detector
|
protected |
the extractor
|
protected |
the image as OpenCV's matrix
|
protected |
we store keypoints using OpenCV's struct
|
protected |
landmark Id, if associated – 0 otherwise