2つの画像(AとB)が互いにわずかに歪んでいて、それらの間に平行移動、回転、スケールの違いがあります(たとえば、これらの画像:)

Ssoooooooo必要なのは、写真Bに一種の変換を適用して、同じサイズ、向き、翻訳なしで両方の写真を作成するために存在する歪み/翻訳/回転を補正することです。
以下に示すように、私はすでにポイントを抽出し、ホモグラフィを見つけました。しかし、ホモグラフィを使用して変換する方法がわからないMat img_Bため、次のようになりMat img_Aます。何か案が?
//-- Localize the object from img_1 in img_2
std::vector<Point2f> obj;
std::vector<Point2f> scene;
for (unsigned int i = 0; i < good_matches.size(); i++) {
//-- Get the keypoints from the good matches
obj.push_back(keypoints_object[good_matches[i].queryIdx].pt);
scene.push_back(keypoints_scene[good_matches[i].trainIdx].pt);
}
Mat H = findHomography(obj, scene, CV_RANSAC);
乾杯、