34 #ifndef vpBasicKeyPoint_H
35 #define vpBasicKeyPoint_H
42 #include <visp3/core/vpColor.h>
43 #include <visp3/core/vpImage.h>
44 #include <visp3/core/vpImagePoint.h>
45 #include <visp3/core/vpRect.h>
64 : m_referenceImagePointsList(), m_currentImagePointsList(), m_matchedReferencePoints(), m_reference_computed(false)
72 m_matchedReferencePoints.resize(0);
73 m_currentImagePointsList.resize(0);
74 m_referenceImagePointsList.resize(0);
86 unsigned int width) = 0;
102 unsigned int width) = 0;
113 unsigned int size = 3) = 0;
147 if (index >= m_referenceImagePointsList.size()) {
148 vpTRACE(
"Index of the reference point out of range");
152 referencePoint.
set_ij(m_referenceImagePointsList[index].get_i(), m_referenceImagePointsList[index].get_j());
168 if (index >= m_matchedReferencePoints.size()) {
169 vpTRACE(
"Index of the matched points out of range");
172 referencePoint.
set_ij(m_referenceImagePointsList[m_matchedReferencePoints[index]].get_i(),
173 m_referenceImagePointsList[m_matchedReferencePoints[index]].get_j());
174 currentPoint.
set_ij(m_currentImagePointsList[index].get_i(), m_currentImagePointsList[index].get_j());
202 if (indexInMatchedPointList >= m_matchedReferencePoints.size()) {
203 vpTRACE(
"Index of the matched reference point out of range");
206 return m_matchedReferencePoints[indexInMatchedPointList];
280 virtual void init() = 0;
class that defines what is a keypoint. This class provides all the basic elements to implement classe...
bool referenceBuilt() const
const std::vector< unsigned int > & getMatchedReferencePoints() const
virtual unsigned int buildReference(const vpImage< unsigned char > &I)=0
unsigned int getMatchedPointNumber() const
virtual unsigned int matchPoint(const vpImage< unsigned char > &I, const vpRect &rectangle)=0
std::vector< unsigned int > m_matchedReferencePoints
void getReferencePoint(unsigned int index, vpImagePoint &referencePoint)
void getMatchedPoints(unsigned int index, vpImagePoint &referencePoint, vpImagePoint ¤tPoint)
virtual unsigned int matchPoint(const vpImage< unsigned char > &I, const vpImagePoint &iP, unsigned int height, unsigned int width)=0
std::vector< vpImagePoint > m_currentImagePointsList
bool m_reference_computed
std::vector< vpImagePoint > m_referenceImagePointsList
const vpImagePoint * getAllPointsInReferenceImage()
virtual unsigned int buildReference(const vpImage< unsigned char > &I, const vpImagePoint &iP, unsigned int height, unsigned int width)=0
const std::vector< vpImagePoint > & getReferenceImagePointsList() const
virtual void display(const vpImage< unsigned char > &Icurrent, unsigned int size=3, const vpColor &color=vpColor::green)=0
virtual unsigned int buildReference(const vpImage< unsigned char > &I, const vpRect &rectangle)=0
virtual ~vpBasicKeyPoint()
unsigned int getIndexInAllReferencePointList(unsigned int indexInMatchedPointList)
virtual unsigned int matchPoint(const vpImage< unsigned char > &I)=0
unsigned int getReferencePointNumber() const
virtual void display(const vpImage< unsigned char > &Iref, const vpImage< unsigned char > &Icurrent, unsigned int size=3)=0
const std::vector< vpImagePoint > & getCurrentImagePointsList() const
Class to define RGB colors available for display functionalities.
static const vpColor green
error that can be emitted by ViSP classes.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
void set_ij(double ii, double jj)
Defines a rectangle in the plane.