Template Struct KeypointsListT

Struct Documentation

template<class KeypointT>
struct KeypointsListT

Public Types

using value_type = KeypointT
using iterator = typename std::vector<KeypointT>::iterator
using const_iterator = typename std::vector<KeypointT>::const_iterator

Public Functions

KeypointsListT() = default
inline explicit KeypointsListT(std::vector<KeypointT> keypoints, std::vector<Edge> edges)
inline explicit KeypointsListT(std::vector<KeypointT> keypoints)
~KeypointsListT() = default
inline iterator begin() noexcept
inline iterator end() noexcept
inline const_iterator begin() const noexcept
inline const_iterator end() const noexcept
inline const_iterator cbegin() const noexcept
inline const_iterator cend() const noexcept
inline bool empty() const noexcept
inline size_t size() const noexcept
inline value_type &operator[](size_t i)
inline const value_type &operator[](size_t i) const
inline void setKeypoints(const std::vector<KeypointT> kps)

Sets the keypoints list.

Note

This will clear any existing keypoints and edges.

Parameters:

keypoints – list of Keypoint objects to set.

inline void setKeypoints(std::vector<KeypointT> keypoints, std::vector<Edge> edges)

Sets the keypoints list.

Note

This will clear any existing keypoints and edges.

Parameters:

keypoints – list of Keypoint objects and edges to set.

inline void setEdges(std::vector<Edge> edges)

Set the indices of the edges.

Parameters:

edges – Vector of edge indices.

inline std::vector<KeypointT> getKeypoints() const

Get keypoints.

Returns:

Vector of Keypoint objects.

inline std::vector<Edge> getEdges() const

Get the indices of the edges.

Returns:

Vector of edge indices.

inline std::vector<Point3f> getPoints3f() const

Get only image coordinates of the keypoints.

Returns:

Vector of Point3f coordinates.

inline std::vector<Point2f> getPoints2f() const

Get only image 2D coordinates of the keypoints and drop the z axis values.

Returns:

Vector of Point2f coordinates.

Protected Attributes

std::vector<KeypointT> keypoints
std::vector<Edge> edges