mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Merge pull request #29175 from asmorkalov:as/geometry2
Geometry module #29175 OpenCV Contrib: https://github.com/opencv/opencv_contrib/pull/4129 CI changes: https://github.com/opencv/ci-gha-workflow/pull/313 Continues - https://github.com/opencv/opencv/pull/28804 - https://github.com/opencv/opencv/pull/29101 - https://github.com/opencv/opencv/pull/29108 - https://github.com/opencv/opencv/pull/28810 Todo for followup PRs: - [x] Rename doxygen groups - [x] Fix JS modules layout and whitelists - [ ] Sort tutorials code/snippets ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
committed by
GitHub
parent
14a475aa0b
commit
59218f9edd
+2
-2
@@ -3,7 +3,7 @@ package org.opencv.samples.cameracalibration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.opencv.cv3d.Cv3d;
|
||||
import org.opencv.geometry.Geometry;
|
||||
import org.opencv.calib.Calib;
|
||||
import org.opencv.core.Core;
|
||||
import org.opencv.core.CvType;
|
||||
@@ -109,7 +109,7 @@ public class CameraCalibrator {
|
||||
int totalPoints = 0;
|
||||
for (int i = 0; i < objectPoints.size(); i++) {
|
||||
MatOfPoint3f points = new MatOfPoint3f(objectPoints.get(i));
|
||||
Cv3d.projectPoints(points, rvecs.get(i), tvecs.get(i),
|
||||
Geometry.projectPoints(points, rvecs.get(i), tvecs.get(i),
|
||||
mCameraMatrix, distortionCoefficients, cornersProjected);
|
||||
error = Core.norm(mCornersBuffer.get(i), cornersProjected, Core.NORM_L2);
|
||||
|
||||
|
||||
+3
-3
@@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame;
|
||||
import org.opencv.cv3d.Cv3d;
|
||||
import org.opencv.geometry.Geometry;
|
||||
import org.opencv.calib.Calib;
|
||||
import org.opencv.core.Core;
|
||||
import org.opencv.core.Mat;
|
||||
@@ -52,7 +52,7 @@ class UndistortionFrameRender extends FrameRender {
|
||||
@Override
|
||||
public Mat render(CvCameraViewFrame inputFrame) {
|
||||
Mat renderedFrame = new Mat(inputFrame.rgba().size(), inputFrame.rgba().type());
|
||||
Cv3d.undistort(inputFrame.rgba(), renderedFrame,
|
||||
Geometry.undistort(inputFrame.rgba(), renderedFrame,
|
||||
mCalibrator.getCameraMatrix(), mCalibrator.getDistortionCoefficients());
|
||||
|
||||
return renderedFrame;
|
||||
@@ -73,7 +73,7 @@ class ComparisonFrameRender extends FrameRender {
|
||||
@Override
|
||||
public Mat render(CvCameraViewFrame inputFrame) {
|
||||
Mat undistortedFrame = new Mat(inputFrame.rgba().size(), inputFrame.rgba().type());
|
||||
Cv3d.undistort(inputFrame.rgba(), undistortedFrame,
|
||||
Geometry.undistort(inputFrame.rgba(), undistortedFrame,
|
||||
mCalibrator.getCameraMatrix(), mCalibrator.getDistortionCoefficients());
|
||||
|
||||
Mat comparisonFrame = inputFrame.rgba();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* 3calibration.cpp -- Calibrate 3 cameras in a horizontal line together.
|
||||
*/
|
||||
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/geometry.hpp"
|
||||
#include "opencv2/stereo.hpp"
|
||||
#include "opencv2/calib.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
|
||||
@@ -11,7 +11,7 @@ set(OPENCV_CPP_SAMPLES_REQUIRED_DEPS
|
||||
opencv_objdetect
|
||||
opencv_photo
|
||||
opencv_features
|
||||
opencv_3d
|
||||
opencv_geometry
|
||||
opencv_stereo
|
||||
opencv_calib
|
||||
opencv_stitching
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include <opencv2/features.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
#include <opencv2/3d.hpp>
|
||||
#include <opencv2/geometry/3d.hpp>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#ifdef HAVE_OPENCV_XFEATURES2D
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/core/utility.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/geometry.hpp"
|
||||
#include "opencv2/calib.hpp"
|
||||
#include "opencv2/imgcodecs.hpp"
|
||||
#include "opencv2/videoio.hpp"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <opencv2/3d.hpp>
|
||||
#include <opencv2/geometry/2d.hpp>
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
#include <iostream>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
||||
// of this distribution and at http://opencv.org/license.html
|
||||
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/geometry.hpp"
|
||||
#include "opencv2/features.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
*********************************************************************************/
|
||||
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/geometry/2d.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
#include <iostream>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "opencv2/core.hpp"
|
||||
#include <opencv2/core/utility.hpp>
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/geometry.hpp"
|
||||
#include "opencv2/calib.hpp"
|
||||
#include "opencv2/imgcodecs.hpp"
|
||||
#include "opencv2/objdetect.hpp"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
||||
// of this distribution and at http://opencv.org/license.html
|
||||
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/geometry.hpp"
|
||||
#include "opencv2/features.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
@@ -104,4 +104,4 @@ int main(int args, char** argv) {
|
||||
imshow("epipolar lines, image 1, 2", image1);
|
||||
imwrite("epipolar_lines.png", image1);
|
||||
waitKey(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* A program that illustrates intersectConvexConvex in various scenarios
|
||||
*/
|
||||
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/geometry.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/geometry/2d.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/imgcodecs.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// each image
|
||||
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/geometry.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/imgcodecs.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
GitHub: https://github.com/opencv/opencv/
|
||||
************************************************** */
|
||||
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/geometry.hpp"
|
||||
#include "opencv2/stereo.hpp"
|
||||
#include "opencv2/calib.hpp"
|
||||
#include "opencv2/imgcodecs.hpp"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Copyright 2010 Argus Corp. All rights reserved.
|
||||
*
|
||||
*/
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/geometry.hpp"
|
||||
#include "opencv2/stereo.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/imgcodecs.hpp"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "opencv2/imgcodecs.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/geometry.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "opencv2/imgcodecs.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/geometry.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "opencv2/imgcodecs.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/geometry.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
#include "opencv2/highgui.hpp"
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/geometry.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <opencv2/core.hpp>
|
||||
#include <opencv2/core/utility.hpp>
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include <opencv2/3d.hpp>
|
||||
#include <opencv2/geometry.hpp>
|
||||
#include <opencv2/calib.hpp>
|
||||
#include <opencv2/imgcodecs.hpp>
|
||||
#include <opencv2/videoio.hpp>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "Mesh.h"
|
||||
#include <opencv2/3d.hpp>
|
||||
#include <opencv2/geometry.hpp>
|
||||
|
||||
// --------------------------------------------------- //
|
||||
// TRIANGLE CLASS //
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "PnPProblem.h"
|
||||
#include "Mesh.h"
|
||||
|
||||
#include <opencv2/3d.hpp>
|
||||
#include <opencv2/geometry.hpp>
|
||||
|
||||
/* Functions for Möller-Trumbore intersection algorithm */
|
||||
static cv::Point3f CROSS(cv::Point3f v1, cv::Point3f v2)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <opencv2/opencv_modules.hpp>
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include <opencv2/3d.hpp>
|
||||
#include <opencv2/geometry.hpp>
|
||||
#include <opencv2/flann.hpp>
|
||||
#if defined (HAVE_OPENCV_XFEATURES2D)
|
||||
#include <opencv2/xfeatures2d.hpp>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <opencv2/core/utils/filesystem.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include <opencv2/3d.hpp>
|
||||
#include <opencv2/geometry.hpp>
|
||||
#include <opencv2/video/tracking.hpp>
|
||||
// PnP Tutorial
|
||||
#include "Mesh.h"
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
// OpenCV
|
||||
#include <opencv2/core.hpp>
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include <opencv2/3d.hpp>
|
||||
#include <opencv2/geometry.hpp>
|
||||
#include <opencv2/features.hpp>
|
||||
// PnP Tutorial
|
||||
#include "Mesh.h"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "opencv2/xfeatures2d.hpp"
|
||||
#include <opencv2/videoio.hpp>
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include <opencv2/3d.hpp>
|
||||
#include <opencv2/geometry.hpp>
|
||||
#include <opencv2/highgui.hpp> //for imshow
|
||||
|
||||
#include "stats.h" // Stats structure definition
|
||||
@@ -220,4 +220,4 @@ int main()
|
||||
std::cout << "This tutorial code needs the xfeatures2d contrib module to be run." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <iostream>
|
||||
#include <opencv2/core.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
#include <opencv2/3d.hpp>
|
||||
#include <opencv2/geometry.hpp>
|
||||
#include <opencv2/calib.hpp>
|
||||
#include <opencv2/objdetect.hpp>
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
#include <opencv2/core.hpp>
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
#include <opencv2/3d.hpp>
|
||||
#include <opencv2/geometry.hpp>
|
||||
#include <opencv2/objdetect.hpp>
|
||||
#include <opencv2/calib.hpp>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <iostream>
|
||||
#include <opencv2/core.hpp>
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include <opencv2/3d.hpp>
|
||||
#include <opencv2/geometry.hpp>
|
||||
#include <opencv2/calib.hpp>
|
||||
#include <opencv2/objdetect.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <iostream>
|
||||
#include <opencv2/core.hpp>
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include <opencv2/3d.hpp>
|
||||
#include <opencv2/geometry.hpp>
|
||||
#include <opencv2/calib.hpp>
|
||||
#include <opencv2/objdetect.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#include <iostream>
|
||||
#include "opencv2/core.hpp"
|
||||
#ifdef HAVE_OPENCV_XFEATURES2D
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/geometry.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/features.hpp"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include <opencv2/core.hpp>
|
||||
#include <opencv2/3d.hpp>
|
||||
#include <opencv2/geometry.hpp>
|
||||
|
||||
bool customFunc(const std::vector<double> &model_coefficients);
|
||||
|
||||
@@ -87,4 +87,4 @@ int planeSegmentationUsingRANSAC(const cv::Mat &pt_cloud,
|
||||
int main()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ set(OPENCV_CUDA_SAMPLES_REQUIRED_DEPS
|
||||
opencv_video
|
||||
opencv_objdetect
|
||||
opencv_features
|
||||
opencv_3d
|
||||
opencv_geometry
|
||||
opencv_superres
|
||||
opencv_cudaarithm
|
||||
opencv_cudafilters
|
||||
|
||||
@@ -3,7 +3,7 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.opencv.core.*;
|
||||
import org.opencv.3d.Cv3d;
|
||||
import org.opencv.geometry.Geometry;
|
||||
import org.opencv.calib.Calib;
|
||||
import org.opencv.highgui.HighGui;
|
||||
import org.opencv.imgcodecs.Imgcodecs;
|
||||
@@ -29,7 +29,7 @@ class PerspectiveCorrectionRun {
|
||||
|
||||
//! [estimate-homography]
|
||||
Mat H = new Mat();
|
||||
H = Cv3d.findHomography(corners1, corners2);
|
||||
H = Geometry.findHomography(corners1, corners2);
|
||||
System.out.println(H.dump());
|
||||
//! [estimate-homography]
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.opencv._3d;
|
||||
import org.opencv.geometry.Geometry;
|
||||
import org.opencv.core.Core;
|
||||
import org.opencv.core.CvType;
|
||||
import org.opencv.core.DMatch;
|
||||
@@ -82,7 +82,7 @@ class SURFFLANNMatchingHomography {
|
||||
objMat.fromList(obj);
|
||||
sceneMat.fromList(scene);
|
||||
double ransacReprojThreshold = 3.0;
|
||||
Mat H = Cv3d.findHomography( objMat, sceneMat, Cv3d.RANSAC, ransacReprojThreshold );
|
||||
Mat H = Geometry.findHomography( objMat, sceneMat, Geometry.RANSAC, ransacReprojThreshold );
|
||||
|
||||
//-- Get the corners from the image_1 ( the object to be "detected" )
|
||||
Mat objCorners = new Mat(4, 1, CvType.CV_32FC2), sceneCorners = new Mat();
|
||||
|
||||
@@ -13,7 +13,7 @@ SET(OPENCV_OPENGL_SAMPLES_REQUIRED_DEPS
|
||||
opencv_core
|
||||
opencv_imgproc
|
||||
opencv_imgcodecs
|
||||
opencv_3d
|
||||
opencv_geometry
|
||||
opencv_videoio
|
||||
opencv_highgui)
|
||||
ocv_check_dependencies(${OPENCV_OPENGL_SAMPLES_REQUIRED_DEPS})
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/core/opengl.hpp"
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
#include "opencv2/geometry.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
|
||||
@@ -9,7 +9,7 @@ set(OPENCV_TAPI_SAMPLES_REQUIRED_DEPS
|
||||
opencv_highgui
|
||||
opencv_objdetect
|
||||
opencv_features
|
||||
opencv_3d
|
||||
opencv_geometry
|
||||
opencv_stereo
|
||||
opencv_flann)
|
||||
ocv_check_dependencies(${OPENCV_TAPI_SAMPLES_REQUIRED_DEPS})
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/core/ocl.hpp"
|
||||
#include "opencv2/core/utility.hpp"
|
||||
#include "opencv2/3d.hpp"
|
||||
#include "opencv2/geometry/2d.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/imgcodecs.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
|
||||
Reference in New Issue
Block a user