1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23: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:
Alexander Smorkalov
2026-05-31 14:23:15 +03:00
committed by GitHub
parent 14a475aa0b
commit 59218f9edd
291 changed files with 267 additions and 248 deletions
@@ -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);
@@ -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();