39 #ifndef vpBasicKeyPoint_H
40 #define vpBasicKeyPoint_H
47 #include <visp3/core/vpColor.h>
48 #include <visp3/core/vpImage.h>
49 #include <visp3/core/vpImagePoint.h>
50 #include <visp3/core/vpRect.h>
69 matchedReferencePoints.resize(0);
70 currentImagePointsList.resize(0);
71 referenceImagePointsList.resize(0);
77 unsigned int width) = 0;
84 unsigned int width) = 0;
89 unsigned int size = 3) = 0;
120 if (index >= referenceImagePointsList.size()) {
121 vpTRACE(
"Index of the reference point out of range");
125 referencePoint.
set_ij(referenceImagePointsList[index].get_i(), referenceImagePointsList[index].get_j());
141 if (index >= matchedReferencePoints.size()) {
142 vpTRACE(
"Index of the matched points out of range");
145 referencePoint.
set_ij(referenceImagePointsList[matchedReferencePoints[index]].get_i(),
146 referenceImagePointsList[matchedReferencePoints[index]].get_j());
147 currentPoint.
set_ij(currentImagePointsList[index].get_i(), currentImagePointsList[index].get_j());
176 if (indexInMatchedPointList >= matchedReferencePoints.size()) {
177 vpTRACE(
"Index of the matched reference point out of range");
180 return matchedReferencePoints[indexInMatchedPointList];
227 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
bool _reference_computed
flag to indicate if the reference has been built.
virtual unsigned int buildReference(const vpImage< unsigned char > &I)=0
std::vector< vpImagePoint > currentImagePointsList
unsigned int getMatchedPointNumber() const
virtual unsigned int matchPoint(const vpImage< unsigned char > &I, const vpRect &rectangle)=0
void getReferencePoint(unsigned int index, vpImagePoint &referencePoint)
std::vector< unsigned int > matchedReferencePoints
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
const vpImagePoint * getAllPointsInReferenceImage()
std::vector< vpImagePoint > referenceImagePointsList
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 functionnalities.
static const vpColor green
error that can be emited 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.