1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge pull request #26405 from kaingwade:rename_features2d

Rename features2d #26405

This PR renames the module _features2d_ to _features_ as one of the Big OpenCV Cleanup #25007. 
Related PR: opencv/opencv_contrib: [#3820](https://github.com/opencv/opencv_contrib/pull/3820) opencv/ci-gha-workflow: [#192](https://github.com/opencv/ci-gha-workflow/pull/192)
This commit is contained in:
WU Jia
2024-11-12 16:04:48 +08:00
committed by GitHub
parent c7a21dc5bf
commit 614e250fd3
260 changed files with 273 additions and 268 deletions
@@ -3,7 +3,7 @@ set(sample example-tutorial-2-mixedprocessing)
if(BUILD_FAT_JAVA_LIB)
set(native_deps opencv_java)
else()
set(native_deps opencv_features2d)
set(native_deps opencv_features)
endif()
add_android_project(${sample} "${CMAKE_CURRENT_SOURCE_DIR}" LIBRARY_DEPS "${OPENCV_ANDROID_LIB_DIR}" SDK_TARGET 11 "${ANDROID_SDK_TARGET}" NATIVE_DEPS ${native_deps})
@@ -1,7 +1,7 @@
#include <jni.h>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/features2d.hpp>
#include <opencv2/features.hpp>
#include <vector>
using namespace std;
+1 -1
View File
@@ -10,7 +10,7 @@ set(OPENCV_CPP_SAMPLES_REQUIRED_DEPS
opencv_video
opencv_objdetect
opencv_photo
opencv_features2d
opencv_features
opencv_3d
opencv_stereo
opencv_calib
+1 -1
View File
@@ -1,6 +1,6 @@
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/features2d.hpp>
#include <opencv2/features.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/3d.hpp>
#include <iostream>
+1 -1
View File
@@ -1,7 +1,7 @@
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/features2d.hpp>
#include <opencv2/features.hpp>
#include "opencv2/core/opengl.hpp"
#include <vector>
+1 -1
View File
@@ -3,7 +3,7 @@
// of this distribution and at http://opencv.org/license.html
#include "opencv2/3d.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/features.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
+1 -1
View File
@@ -6,7 +6,7 @@
#include "opencv2/core.hpp"
#include "opencv2/core/utils/filesystem.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/features.hpp"
#include "opencv2/flann.hpp"
using namespace cv;
+1 -1
View File
@@ -1,7 +1,7 @@
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/features2d.hpp>
#include <opencv2/features.hpp>
#include <vector>
#include <map>
#include <iostream>
+1 -1
View File
@@ -3,7 +3,7 @@
// of this distribution and at http://opencv.org/license.html
#include "opencv2/3d.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/features.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
@@ -10,7 +10,7 @@
#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/features/features.hpp>
class Model
{
@@ -8,7 +8,7 @@
#include "RobustMatcher.h"
#include <time.h>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/features/features.hpp>
RobustMatcher::~RobustMatcher()
{
@@ -12,7 +12,7 @@
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/features/features.hpp>
class RobustMatcher {
public:
@@ -10,7 +10,7 @@
#include <iostream>
#include <opencv2/features2d.hpp>
#include <opencv2/features.hpp>
#include "PnPProblem.h"
// Draw a text with the question point
@@ -4,7 +4,7 @@
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/3d.hpp>
#include <opencv2/features2d.hpp>
#include <opencv2/features.hpp>
// PnP Tutorial
#include "Mesh.h"
#include "Model.h"
@@ -1,6 +1,6 @@
#include <iostream>
#ifdef HAVE_OPENCV_XFEATURES2D
#include <opencv2/features2d.hpp>
#include <opencv2/features.hpp>
#include "opencv2/xfeatures2d.hpp"
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
@@ -3,7 +3,7 @@
#include <iomanip>
#ifdef HAVE_OPENCV_XFEATURES2D
#include <opencv2/features2d.hpp>
#include <opencv2/features.hpp>
#include "opencv2/xfeatures2d.hpp"
#include <opencv2/videoio.hpp>
#include <opencv2/imgproc.hpp>
@@ -2,7 +2,7 @@
#include "opencv2/core.hpp"
#ifdef HAVE_OPENCV_XFEATURES2D
#include "opencv2/highgui.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/features.hpp"
#include "opencv2/xfeatures2d.hpp"
using namespace cv;
@@ -2,7 +2,7 @@
#include "opencv2/core.hpp"
#ifdef HAVE_OPENCV_XFEATURES2D
#include "opencv2/highgui.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/features.hpp"
#include "opencv2/xfeatures2d.hpp"
using namespace cv;
@@ -2,7 +2,7 @@
#include "opencv2/core.hpp"
#ifdef HAVE_OPENCV_XFEATURES2D
#include "opencv2/highgui.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/features.hpp"
#include "opencv2/xfeatures2d.hpp"
using namespace cv;
@@ -4,7 +4,7 @@
#include "opencv2/3d.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/features.hpp"
#include "opencv2/xfeatures2d.hpp"
using namespace cv;
@@ -1,7 +1,7 @@
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/features2d.hpp>
#include <opencv2/features.hpp>
#include <iostream>
using namespace std;
+1 -1
View File
@@ -10,7 +10,7 @@ set(OPENCV_CUDA_SAMPLES_REQUIRED_DEPS
opencv_ml
opencv_video
opencv_objdetect
opencv_features2d
opencv_features
opencv_3d
opencv_superres
opencv_cudaarithm
@@ -1,10 +1,10 @@
import org.opencv.imgcodecs.Imgcodecs
import org.opencv.features2d.DescriptorExtractor
import org.opencv.features2d.Features2d
import org.opencv.features.DescriptorExtractor
import org.opencv.features.Features
import org.opencv.core.MatOfKeyPoint
import org.opencv.core.Mat
import org.opencv.features2d.FeatureDetector
import org.opencv.features2d.DescriptorMatcher
import org.opencv.features.FeatureDetector
import org.opencv.features.DescriptorMatcher
import org.opencv.core.MatOfDMatch
import reflect._
@@ -61,7 +61,7 @@ object ScalaCorrespondenceMatchingDemo {
// Visualize the matches and save the visualization.
val correspondenceImage = new Mat
Features2d.drawMatches(leftImage, leftKeyPoints, rightImage, rightKeyPoints, dmatches, correspondenceImage)
Features.drawMatches(leftImage, leftKeyPoints, rightImage, rightKeyPoints, dmatches, correspondenceImage)
val filename = "scalaCorrespondences.png"
println(s"Writing ${filename}")
assert(Imgcodecs.imwrite(filename, correspondenceImage))
@@ -16,8 +16,8 @@ import org.opencv.core.MatOfDMatch;
import org.opencv.core.MatOfKeyPoint;
import org.opencv.core.Scalar;
import org.opencv.xfeatures2d.AKAZE;
import org.opencv.features2d.DescriptorMatcher;
import org.opencv.features2d.Features2d;
import org.opencv.features.DescriptorMatcher;
import org.opencv.features.Features;
import org.opencv.highgui.HighGui;
import org.opencv.imgcodecs.Imgcodecs;
import org.w3c.dom.Document;
@@ -133,7 +133,7 @@ class AKAZEMatch {
MatOfKeyPoint inliers1 = new MatOfKeyPoint(listOfInliers1.toArray(new KeyPoint[listOfInliers1.size()]));
MatOfKeyPoint inliers2 = new MatOfKeyPoint(listOfInliers2.toArray(new KeyPoint[listOfInliers2.size()]));
MatOfDMatch goodMatches = new MatOfDMatch(listOfGoodMatches.toArray(new DMatch[listOfGoodMatches.size()]));
Features2d.drawMatches(img1, inliers1, img2, inliers2, goodMatches, res);
Features.drawMatches(img1, inliers1, img2, inliers2, goodMatches, res);
Imgcodecs.imwrite("akaze_result.png", res);
double inlierRatio = listOfInliers1.size() / (double) listOfMatched1.size();
@@ -2,8 +2,8 @@ import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.MatOfDMatch;
import org.opencv.core.MatOfKeyPoint;
import org.opencv.features2d.DescriptorMatcher;
import org.opencv.features2d.Features2d;
import org.opencv.features.DescriptorMatcher;
import org.opencv.features.Features;
import org.opencv.highgui.HighGui;
import org.opencv.imgcodecs.Imgcodecs;
import org.opencv.xfeatures2d.SURF;
@@ -37,7 +37,7 @@ class SURFMatching {
//-- Draw matches
Mat imgMatches = new Mat();
Features2d.drawMatches(img1, keypoints1, img2, keypoints2, matches, imgMatches);
Features.drawMatches(img1, keypoints1, img2, keypoints2, matches, imgMatches);
HighGui.imshow("Matches", imgMatches);
HighGui.waitKey(0);
@@ -1,7 +1,7 @@
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.MatOfKeyPoint;
import org.opencv.features2d.Features2d;
import org.opencv.features.Features;
import org.opencv.highgui.HighGui;
import org.opencv.imgcodecs.Imgcodecs;
import org.opencv.xfeatures2d.SURF;
@@ -24,7 +24,7 @@ class SURFDetection {
detector.detect(src, keypoints);
//-- Draw keypoints
Features2d.drawKeypoints(src, keypoints, src);
Features.drawKeypoints(src, keypoints, src);
//-- Show detected (drawn) keypoints
HighGui.imshow("SURF Keypoints", src);
@@ -8,8 +8,8 @@ import org.opencv.core.MatOfByte;
import org.opencv.core.MatOfDMatch;
import org.opencv.core.MatOfKeyPoint;
import org.opencv.core.Scalar;
import org.opencv.features2d.DescriptorMatcher;
import org.opencv.features2d.Features2d;
import org.opencv.features.DescriptorMatcher;
import org.opencv.features.Features;
import org.opencv.highgui.HighGui;
import org.opencv.imgcodecs.Imgcodecs;
import org.opencv.xfeatures2d.SURF;
@@ -57,8 +57,8 @@ class SURFFLANNMatching {
//-- Draw matches
Mat imgMatches = new Mat();
Features2d.drawMatches(img1, keypoints1, img2, keypoints2, goodMatches, imgMatches, Scalar.all(-1),
Scalar.all(-1), new MatOfByte(), Features2d.DrawMatchesFlags_NOT_DRAW_SINGLE_POINTS);
Features.drawMatches(img1, keypoints1, img2, keypoints2, goodMatches, imgMatches, Scalar.all(-1),
Scalar.all(-1), new MatOfByte(), Features.DrawMatchesFlags_NOT_DRAW_SINGLE_POINTS);
//-- Show detected matches
HighGui.imshow("Good Matches", imgMatches);
@@ -13,8 +13,8 @@ import org.opencv.core.MatOfKeyPoint;
import org.opencv.core.MatOfPoint2f;
import org.opencv.core.Point;
import org.opencv.core.Scalar;
import org.opencv.features2d.DescriptorMatcher;
import org.opencv.features2d.Features2d;
import org.opencv.features.DescriptorMatcher;
import org.opencv.features.Features;
import org.opencv.highgui.HighGui;
import org.opencv.imgcodecs.Imgcodecs;
import org.opencv.imgproc.Imgproc;
@@ -63,8 +63,8 @@ class SURFFLANNMatchingHomography {
//-- Draw matches
Mat imgMatches = new Mat();
Features2d.drawMatches(imgObject, keypointsObject, imgScene, keypointsScene, goodMatches, imgMatches, Scalar.all(-1),
Scalar.all(-1), new MatOfByte(), Features2d.DrawMatchesFlags_NOT_DRAW_SINGLE_POINTS);
Features.drawMatches(imgObject, keypointsObject, imgScene, keypointsScene, goodMatches, imgMatches, Scalar.all(-1),
Scalar.all(-1), new MatOfByte(), Features.DrawMatchesFlags_NOT_DRAW_SINGLE_POINTS);
//-- Localize the object
List<Point> obj = new ArrayList<>();
+1 -1
View File
@@ -4,7 +4,7 @@
Multitarget planar tracking
==================
Example of using features2d framework for interactive video homography matching.
Example of using "features" framework for interactive video homography matching.
ORB features and FLANN matcher are used. This sample provides PlaneTracker class
and an example of its usage.
+1 -1
View File
@@ -8,7 +8,7 @@ set(OPENCV_TAPI_SAMPLES_REQUIRED_DEPS
opencv_videoio
opencv_highgui
opencv_objdetect
opencv_features2d
opencv_features
opencv_3d
opencv_stereo
opencv_flann)