 |
Visual Servoing Platform
version 3.3.0
|
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 height,
unsigned int width) = 0;
84 unsigned int width) = 0;
89 unsigned int size = 3) = 0;
119 if (index >= referenceImagePointsList.size()) {
120 vpTRACE(
"Index of the reference point out of range");
124 referencePoint.
set_ij(referenceImagePointsList[index].get_i(), referenceImagePointsList[index].get_j());
140 if (index >= matchedReferencePoints.size()) {
141 vpTRACE(
"Index of the matched points out of range");
144 referencePoint.
set_ij(referenceImagePointsList[matchedReferencePoints[index]].get_i(),
145 referenceImagePointsList[matchedReferencePoints[index]].get_j());
146 currentPoint.
set_ij(currentImagePointsList[index].get_i(), currentImagePointsList[index].get_j());
175 if (indexInMatchedPointList >= matchedReferencePoints.size()) {
176 vpTRACE(
"Index of the matched reference point out of range");
179 return matchedReferencePoints[indexInMatchedPointList];
226 virtual void init() = 0;
void getMatchedPoints(unsigned int index, vpImagePoint &referencePoint, vpImagePoint ¤tPoint)
class that defines what is a Keypoint. This class provides all the basic elements to implement classe...
void getReferencePoint(unsigned int index, vpImagePoint &referencePoint)
virtual unsigned int buildReference(const vpImage< unsigned char > &I)=0
void set_ij(double ii, double jj)
virtual unsigned int matchPoint(const vpImage< unsigned char > &I, const vpRect &rectangle)=0
const std::vector< vpImagePoint > & getReferenceImagePointsList() const
bool referenceBuilt() const
virtual ~vpBasicKeyPoint()
unsigned int getMatchedPointNumber() const
virtual unsigned int matchPoint(const vpImage< unsigned char > &I)=0
bool _reference_computed
flag to indicate if the reference has been built.
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 vpImagePoint &iP, unsigned int height, unsigned int width)=0
const std::vector< unsigned int > & getMatchedReferencePoints() const
std::vector< vpImagePoint > referenceImagePointsList
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
virtual unsigned int buildReference(const vpImage< unsigned char > &I, const vpRect &rectangle)=0
virtual unsigned int matchPoint(const vpImage< unsigned char > &I, const vpImagePoint &iP, unsigned int height, unsigned int width)=0
std::vector< vpImagePoint > currentImagePointsList
static const vpColor green
const vpImagePoint * getAllPointsInReferenceImage()
unsigned int getReferencePointNumber() const
Class to define colors available for display functionnalities.
std::vector< unsigned int > matchedReferencePoints
const std::vector< vpImagePoint > & getCurrentImagePointsList() const
error that can be emited by ViSP classes.
unsigned int getIndexInAllReferencePointList(unsigned int indexInMatchedPointList)
Defines a rectangle in the plane.
virtual void display(const vpImage< unsigned char > &Iref, const vpImage< unsigned char > &Icurrent, unsigned int size=3)=0