Home > Back-end >  After image registration to find feature points, how aligned on the overlap of the two image fusion?
After image registration to find feature points, how aligned on the overlap of the two image fusion?

Time:11-09

#include
#include
#include
#include
#include

Using the namespace CV;
using namespace std;

Int main (int arg c, char * argv [])
{
/* Mat img1=imread (" Image01. JPG "); */
Mat img1=imread (" 1. JPG ");
/* Mat img2=imread (" Image02. JPG "); */
Mat img2=imread (" 2. JPG ");
//cvtColor (img1, img1, CV_RGB2GRAY);
//cvtColor (img2, img2 CV_RGB2GRAY);

//- Step 1: Detect the keypoints using SURF the Detector to Detect the key
Int minHessian=400;
SurfFeatureDetector detector (minHessian);
STD: : vector Keypoints_1 keypoints_2;//vector
The detector detect (img1, keypoints_1);
The detector detect (img2 keypoints_2);

//- Step 2: Calculate descriptors (feature vectors) computing descriptor
SurfDescriptorExtractor extractor;
Mat descriptors_1 descriptors_2;//two matrices
Extractor.com pute (img1, keypoints_1 descriptors_1);//put the figure of a key point in the description for the matrix?
Extractor.com pute (img2 keypoints_2, descriptors_2);

//- Step 3: Matching descriptor vectors using FLANN matcher use FLANN matcher match descriptor vector
FlannBasedMatcher matcher.
//BruteForceMatcher The matcher.
STD: : vectorThe matcher. Match (descriptors_1 descriptors_2, matches);//describe the matching child...

Mat imgMatches;
DrawMatches (img1, keypoints_1, img2 keypoints_2, matches, imgMatches);
NamedWindow (" Matches ");
Imshow (" Matches ", imgMatches);///all of the matching vector
}

CodePudding user response:

Beginners are unlikely to write their own procedures can only read it

CodePudding user response:

To ask but do you understand

CodePudding user response:

Warm oh don't ask people help me

CodePudding user response:

Warm paste!!!!!! Help!!!!!! How to write down!!!!!!

CodePudding user response:

Whether can be the reference image and registration in the same coordinate system, then the registration image projection transformation,

CodePudding user response:

Match point is already written, began to transform matrix to calculate, alignment after fusion
  • Related