1 #include <visp3/core/vpConfig.h>
3 #include <visp3/gui/vpDisplayOpenCV.h>
4 #include <visp3/io/vpImageIo.h>
5 #include <visp3/io/vpVideoReader.h>
7 #include <visp3/vision/vpKeyPoint.h>
13 #if defined(HAVE_OPENCV_HIGHGUI) && defined(HAVE_OPENCV_IMGPROC) && defined(HAVE_OPENCV_FEATURES2D)
15 #ifdef ENABLE_VISP_NAMESPACE
25 const std::string detectorName =
"ORB";
26 const std::string extractorName =
"ORB";
28 const std::string matcherName =
"BruteForce-Hamming";
30 vpKeyPoint keypoint(detectorName, extractorName, matcherName, filterType);
31 std::cout <<
"Reference keypoints=" << keypoint.buildReference(I) << std::endl;
41 vpDisplayOpenCV d(Idisp, 0, 0,
"Matching keypoints with ORB keypoints");
46 while (!reader.
end()) {
59 unsigned int nbMatch = keypoint.matchPoint(I);
62 std::cout <<
"Matches=" << nbMatch << std::endl;
66 for (
unsigned int i = 0; i < nbMatch; i++) {
67 keypoint.getMatchedPoints(i, iPref, iPcur);
static const vpColor white
static const vpColor green
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
static void display(const vpImage< unsigned char > &I)
static void displayLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1, bool segment=true)
static void flush(const vpImage< unsigned char > &I)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
unsigned int getWidth() const
void resize(unsigned int h, unsigned int w)
resize the image : Image initialization
void insert(const vpImage< Type > &src, const vpImagePoint &topLeft)
unsigned int getHeight() const
Class that allows keypoints detection (and descriptors extraction) and matching thanks to OpenCV libr...
Class that enables to manipulate easily a video file or a sequence of images. As it inherits from the...
void acquire(vpImage< vpRGBa > &I)
void setFileName(const std::string &filename)