After many days of study and reading other people's blogs, I find myself weak, but I believe it will become a legend in time.
One of my problems is that I can hardly understand the current paper. Although I also know what is a feature, those in the memory are a matrix, but I still cannot understand it until now, I marked the feature points of an image and tried to print out the values of a vector, but I found that for_each could not do this, I don't know what the data storage format is.
CodeAs follows:
# Include <opencv2/CORE/core. HPP> # include <opencv2/features2d/features2d. HPP> # include <opencv2/highgui. HPP> # include <opencv2/legacy. HPP> # include <opencv2/nonfree/features2d. HPP> # include <vector> using namespace STD; using namespace CV; void main () {mat SRC; src = imread ("C: \ 1.jpg "); // keypoint vector <keypoint> keypoints; // fast detect fastfeaturedetector fast (100); fast. detect (SRC, keypoints); drawkeypoints (SRC, keypoints, SRC, scalar: All (-1), drawmatchesflags: draw_rich_keypoints); imshow ("Fast detect", Src ); cout <keypoints. size () <Endl; waitkey (0); System ("pause ");}
The code is very simple, but I can't solve my problem. First write down the code and wait for it to break.