mirror of
https://github.com/opencv/opencv.git
synced 2026-07-25 21:33:04 +04:00
59218f9edd
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
48 lines
1.9 KiB
Java
48 lines
1.9 KiB
Java
package org.opencv.test.calib;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import org.opencv.calib.Calib;
|
|
import org.opencv.core.Core;
|
|
import org.opencv.core.CvType;
|
|
import org.opencv.core.Mat;
|
|
import org.opencv.core.MatOfDouble;
|
|
import org.opencv.core.MatOfPoint2f;
|
|
import org.opencv.core.MatOfPoint3f;
|
|
import org.opencv.core.Point;
|
|
import org.opencv.core.Scalar;
|
|
import org.opencv.core.Size;
|
|
import org.opencv.test.OpenCVTestCase;
|
|
import org.opencv.imgproc.Imgproc;
|
|
|
|
public class CalibTest extends OpenCVTestCase {
|
|
|
|
public void testConstants()
|
|
{
|
|
// calib3d.hpp: some constants have conflict with constants from 'fisheye' namespace
|
|
assertEquals(1, Calib.CALIB_USE_INTRINSIC_GUESS);
|
|
assertEquals(2, Calib.CALIB_FIX_ASPECT_RATIO);
|
|
assertEquals(4, Calib.CALIB_FIX_PRINCIPAL_POINT);
|
|
assertEquals(8, Calib.CALIB_ZERO_TANGENT_DIST);
|
|
assertEquals(16, Calib.CALIB_FIX_FOCAL_LENGTH);
|
|
assertEquals(32, Calib.CALIB_FIX_K1);
|
|
assertEquals(64, Calib.CALIB_FIX_K2);
|
|
assertEquals(128, Calib.CALIB_FIX_K3);
|
|
assertEquals(0x0800, Calib.CALIB_FIX_K4);
|
|
assertEquals(0x1000, Calib.CALIB_FIX_K5);
|
|
assertEquals(0x2000, Calib.CALIB_FIX_K6);
|
|
assertEquals(0x4000, Calib.CALIB_RATIONAL_MODEL);
|
|
assertEquals(0x8000, Calib.CALIB_THIN_PRISM_MODEL);
|
|
assertEquals(0x10000, Calib.CALIB_FIX_S1_S2_S3_S4);
|
|
assertEquals(0x40000, Calib.CALIB_TILTED_MODEL);
|
|
assertEquals(0x80000, Calib.CALIB_FIX_TAUX_TAUY);
|
|
assertEquals(0x100000, Calib.CALIB_USE_QR);
|
|
assertEquals(0x200000, Calib.CALIB_FIX_TANGENT_DIST);
|
|
assertEquals(0x100, Calib.CALIB_FIX_INTRINSIC);
|
|
assertEquals(0x200, Calib.CALIB_SAME_FOCAL_LENGTH);
|
|
assertEquals(0x400, Calib.CALIB_ZERO_DISPARITY);
|
|
assertEquals((1 << 17), Calib.CALIB_USE_LU);
|
|
assertEquals((1 << 22), Calib.CALIB_USE_EXTRINSIC_GUESS);
|
|
}
|
|
}
|