34 #ifndef VP_BASIC_KEYPOINT_H
35 #define VP_BASIC_KEYPOINT_H
42 #include <visp3/core/vpDebug.h>
43 #include <visp3/core/vpColor.h>
44 #include <visp3/core/vpImage.h>
45 #include <visp3/core/vpImagePoint.h>
46 #include <visp3/core/vpRect.h>
66 : m_referenceImagePointsList(), m_currentImagePointsList(), m_matchedReferencePoints(), m_reference_computed(false)
74 m_matchedReferencePoints.resize(0);
75 m_currentImagePointsList.resize(0);
76 m_referenceImagePointsList.resize(0);
88 unsigned int width) = 0;
104 unsigned int width) = 0;
115 unsigned int size = 3) = 0;
149 if (index >= m_referenceImagePointsList.size()) {
150 vpTRACE(
"Index of the reference point out of range");
154 referencePoint.
set_ij(m_referenceImagePointsList[index].get_i(), m_referenceImagePointsList[index].get_j());
170 if (index >= m_matchedReferencePoints.size()) {
171 vpTRACE(
"Index of the matched points out of range");
174 referencePoint.
set_ij(m_referenceImagePointsList[m_matchedReferencePoints[index]].get_i(),
175 m_referenceImagePointsList[m_matchedReferencePoints[index]].get_j());
176 currentPoint.
set_ij(m_currentImagePointsList[index].get_i(), m_currentImagePointsList[index].get_j());
204 if (indexInMatchedPointList >= m_matchedReferencePoints.size()) {
205 vpTRACE(
"Index of the matched reference point out of range");
208 return m_matchedReferencePoints[indexInMatchedPointList];
282 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.