在我的opencv项目中,我想检测图像中的复制移动伪造.我知道如何使用opencv FLANN在2个不同的图像中进行特征匹配,但是我对如何使用FLANN进行图像中的检测复制 - 移动伪造感到困惑.
P.S1:我得到了图像的筛选关键点和描述符,并坚持使用特征匹配类.
P.S2:特征匹配的类型对我来说并不重要.
提前致谢.
更新:
这些图片是我需要的一个例子
并且有一个代码可以匹配两个图像的特征,并在两个图像(不是一个)上执行类似的操作,android native opencv格式的代码如下所示:
vector<KeyPoint> keypoints;
Mat descriptors;
// Create a SIFT keypoint detector.
SiftFeatureDetector detector;
detector.detect(image_gray, keypoints);
LOGI("Detected %d Keypoints ...", (int) keypoints.size());
// Compute feature description.
detector.compute(image, keypoints, descriptors);
LOGI("Compute Feature ...");
FlannBasedMatcher matcher;
std::vector< DMatch > matches;
matcher.match( descriptors, descriptors, matches );
double max_dist = 0; double min_dist = 100;
//-- Quick calculation of max and min distances between keypoints
for( int i = 0; i < descriptors.rows; i++ …Run Code Online (Sandbox Code Playgroud)