Commit Graph

62 Commits

Author SHA1 Message Date
Alexander Smorkalov
3bcab8db0a
Merge pull request #26221 from asmorkalov:as/refactor_multiview_interface
Reworked multiview calibration interface #26221

- Use InputArray / OutputArray
- Use enum for camera type
- Sort parameters according guidelines
- Made more outputs optional
- Introduce flags and added tests for intrinsics and extrinsics guess.

### 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
- [ ] 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
2024-10-01 16:53:16 +03:00
Alexander Smorkalov
6ed4e7acae registerCameras test for heterogenious pinhone + fisheye setup. 2024-09-30 12:38:15 +03:00
Alexander Smorkalov
0fa4b0ead2 Multi-camera calibration tests with real cameras. 2024-09-25 22:54:10 +03:00
Alexander Smorkalov
8256ef3321
Merge pull request #26183 from asmorkalov:as/multiview_calib_docs
Multiview calibration pipeline documentation update
2024-09-24 13:43:42 +03:00
lpanaf
938dabef0e Multiview calibration pipeline documentation update. 2024-09-24 11:54:25 +03:00
Alexander Smorkalov
4d5beef7db Java Script config fix after 4.x merge. 2024-09-24 11:44:09 +03:00
Maksim Shabunin
f73560293f
Merge pull request #26101 from mshabunin:cpp-error-ts
C-API cleanup: moved cvErrorStr to new interface, minor ts changes #26101

Merge with opencv/opencv_contrib#3786

**Note:** `toString` might be too generic name (even though it is in `cv::Error::` namespace), another variant is `codeToString` (we have `typeToString` and `depthToString` in check.hpp).

**Note:** _ts_ module seem to have no other C API usage except for `ArrayTest` class which requires refactoring.
2024-09-06 12:05:47 +03:00
Alexander Smorkalov
100db1bc0b Merge branch 4.x 2024-08-28 15:06:19 +03:00
Alexander Smorkalov
7e8f2a1bc4 Merge branch 4.x 2024-08-06 15:31:30 +03:00
Alexander Smorkalov
672a662dff Merge branch 4.x 2024-07-26 09:10:36 +03:00
Alexander Smorkalov
fc9208cff5 Merge branch 4.x 2024-07-17 10:08:16 +03:00
Maksim Shabunin
26ea34c4cb Merge branch '4.x' into '5.x' 2024-06-26 19:01:34 +03:00
Alexander Smorkalov
db3e5620cd Merge branch 4.x 2024-04-16 17:28:18 +03:00
Alexander Smorkalov
282c762ead Merge branch 4.x 2024-04-10 11:27:47 +03:00
Alexander Smorkalov
cb6d295f15 Merge branch 4.x 2024-04-02 16:39:54 +03:00
Maksim Shabunin
de29223217
Merge pull request #25161 from mshabunin:doc-upgrade-5.x
Documentation transition to fresh Doxygen (5.x) #25161 

Port of #25042

Merge with opencv/opencv_contrib#3687
CI part: opencv/ci-gha-workflow#162
2024-03-06 08:50:31 +03:00
Maksim Shabunin
8cbdd0c833
Merge pull request #25075 from mshabunin:cleanup-imgproc-1
C-API cleanup: apps, imgproc_c and some constants #25075

Merge with https://github.com/opencv/opencv_contrib/pull/3642

* Removed obsolete apps - traincascade and createsamples (please use older OpenCV versions if you need them). These apps relied heavily on C-API
* removed all mentions of imgproc C-API headers (imgproc_c.h, types_c.h) - they were empty, included core C-API headers
* replaced usage of several C constants with C++ ones (error codes, norm modes, RNG modes, PCA modes, ...) - most part of this PR (split into two parts - all modules and calib+3d - for easier backporting)
* removed imgproc C-API headers (as separate commit, so that other changes could be backported to 4.x)

Most of these changes can be backported to 4.x.
2024-03-05 12:18:31 +03:00
Alexander Smorkalov
cb7d38b477 Merge branch 4.x 2024-02-26 18:05:36 +03:00
Alexander Smorkalov
4c549b8707
Merge pull request #25061 from asmorkalov:as/register_cameras
RegisterCameras function for heterogenious cameras pair #25061

Credits to Linfei Pan
Extracted from https://github.com/opencv/opencv/pull/24052

### 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
- [x] 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

---------

Co-authored-by: lpanaf <linpan@student.ethz.ch>
2024-02-26 15:45:18 +03:00
Alexander Smorkalov
f084a229b4 Merge branch 4.x 2024-02-19 09:06:26 +03:00
Alexander Smorkalov
3a55f50133 Merge branch 4.x 2024-02-12 14:20:35 +03:00
Alexander Smorkalov
c739117a7c Merge branch 4.x 2024-01-19 17:32:22 +03:00
Alexander Smorkalov
97620c053f Merge branch 4.x 2023-10-23 11:53:04 +03:00
Alexander Smorkalov
163d544ecf Merge branch 4.x 2023-10-02 10:17:23 +03:00
Vadim Pisarevsky
416bf3253d
attempt to add 0d/1d mat support to OpenCV (#23473)
* attempt to add 0d/1d mat support to OpenCV

* revised the patch; now 1D mat is treated as 1xN 2D mat rather than Nx1.

* a step towards 'green' tests

* another little step towards 'green' tests

* calib test failures seem to be fixed now

* more fixes _core & _dnn

* another step towards green ci; even 0D mat's (a.k.a. scalars) are now partly supported!

* * fixed strange bug in aruco/charuco detector, not sure why it did not work
* also fixed a few remaining failures (hopefully) in dnn & core

* disabled failing GAPI tests - too complex to dig into this compiler pipeline

* hopefully fixed java tests

* trying to fix some more tests

* quick followup fix

* continue to fix test failures and warnings

* quick followup fix

* trying to fix some more tests

* partly fixed support for 0D/scalar UMat's

* use updated parseReduce() from upstream

* trying to fix the remaining test failures

* fixed [ch]aruco tests in Python

* still trying to fix tests

* revert "fix" in dnn's CUDA tensor

* trying to fix dnn+CUDA test failures

* fixed 1D umat creation

* hopefully fixed remaining cuda test failures

* removed training whitespaces
2023-09-21 18:24:38 +03:00
Vadim Pisarevsky
518486ed3d
Added new data types to cv::Mat & UMat (#23865)
* started working on adding 32u, 64u, 64s, bool and 16bf types to OpenCV

* core & imgproc tests seem to pass

* fixed a few compile errors and test failures on macOS x86

* hopefully fixed some compile problems and test failures

* fixed some more warnings and test failures

* trying to fix small deviations in perf_core & perf_imgproc by revering randf_64f to exact version used before

* trying to fix behavior of the new OpenCV with old plugins; there is (quite strong) assumption that video capture would give us frames with depth == CV_8U (0) or CV_16U (2). If depth is > 7 then it means that the plugin is built with the old OpenCV. It needs to be recompiled, of course and then this hack can be removed.

* try to repair the case when target arch does not have FP64 SIMD

* 1. fixed bug in itoa() found by alalek
2. restored ==, !=, > and < univ. intrinsics on ARM32/ARM64.
2023-08-04 10:50:03 +03:00
Alexander Smorkalov
9ddf1e5c77
Merge pull request #24084 from asmorkalov:as/stereoRectify
Finalize calib3d module split for fisheye part
2023-08-03 11:00:00 +03:00
Alexander Smorkalov
285108e2e1 Finalize calib3d module split for fisheye part. 2023-08-03 09:21:05 +03:00
Alexander Smorkalov
7889ed7f80
Merge pull request #23957 from lpanaf:multi-calib-fix
add error in the first camera to the cost function
2023-08-02 17:45:15 +03:00
lpanaf
36d688ec10 add error in the first camera to the cost function 2023-08-02 15:45:23 +03:00
Alexander Smorkalov
8595066afc Unify Pinhole and Fisheye camera calibration flags. 2023-07-19 14:58:08 +03:00
Alexander Smorkalov
5af40a0269 Merge branch 4.x 2023-07-05 15:51:10 +03:00
Maksym Ivashechkin
67a3d35b4e
Merge pull request #22363 from ivashmak:multiview-calib
Add multiview calibration [GSOC 2022]

### Pull Request Readiness Checklist

- [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
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake

The usage tutorial is on Google Docs following this link: https://docs.google.com/document/d/1k6YpD0tpSVqnVnvU2nzE34K3cp_Po6mLWqXV06CUHwQ/edit?usp=sharing
2023-03-23 15:42:41 +03:00
Rostislav Vasilikhin
23dec329b4
Merge pull request #23150 from savuor:port5_stereo_calib_per_obj
### Changes

* Port of #22519 to 5.x
* Distortion coefficients were not copied properly, fixed
* Minor coding style chages

### 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
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-02-02 16:44:28 +03:00
Alexander Alekhin
f33598f55e Merge branch 4.x 2023-01-28 17:31:32 +00:00
Rostislav Vasilikhin
8329c09ba8
Merge pull request #23178 from savuor:stddev_calib_fisheye
Fixes #23057

Parameter uncertainty fixed + ground truth test data fixed

### 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
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-01-27 09:40:08 +03:00
Alexander Alekhin
593a376566 Merge branch 4.x 2023-01-09 11:08:02 +00:00
Maksim Shabunin
8a62b03761
Merge pull request #22754 from mshabunin:c-cleanup
C-API cleanup for OpenCV 5.x (imgproc, highgui)

* imgproc: C-API cleanup

* imgproc: increase cvtColor test diff threshold

* imgproc: C-API cleanup pt.2

* imgproc: C-API cleanup pt.3

* imgproc: C-API cleanup pt.4

* imgproc: C-API cleanup pt.5

* imgproc: C-API cleanup pt.5

* imgproc: C-API cleanup pt.6

* highgui: C-API cleanup

* highgui: C-API cleanup pt.2

* highgui: C-API cleanup pt.3

* highgui: C-API cleanup pt.3

* imgproc: C-API cleanup pt.7

* fixup! highgui: C-API cleanup pt.3

* fixup! imgproc: C-API cleanup pt.6

* imgproc: C-API cleanup pt.8

* imgproc: C-API cleanup pt.9

* fixup! imgproc: C-API cleanup pt.9

* fixup! imgproc: C-API cleanup pt.9

* fixup! imgproc: C-API cleanup pt.9

* fixup! imgproc: C-API cleanup pt.9

* fixup! imgproc: C-API cleanup pt.9

* fixup! imgproc: C-API cleanup pt.9
2022-12-14 18:57:08 +00:00
Alexander Smorkalov
3857173845
Merge pull request #22287 from asenyaev:asen/disabled_compiling_warnings_5.x
Disabled compiling warnings in case of symbols in cmake for 5.x
2022-09-20 16:19:08 +03:00
Andrey Senyaev
752e5fdc26 Disabled compiling warnings in case of symbols in cmake for 5.x 2022-09-20 13:36:59 +03:00
Rostislav Vasilikhin
f92a1aa07d trying to fix MSVC compilation
double -> float warning

fix warnings in the rest 3d module files

extra var removed

try to fix warnings
2022-09-19 00:27:26 +02:00
Rostislav Vasilikhin
9ba4bb7355 initIntrisicParams2D() refactored
variables refactoring

levmarq fix

initIntrinsicParams2D() refactoring

undo LM fix

cameraCalcJErr: made a lambda; warnings fixed; vars rearranged & renamed, jacobian buffers, perViewErrors and allErrors fix, etc.

stereoCalibrate: internal vars in callback

stereoCalibrate: capture only useful variables

stereoCalibrate: perViewError fix + minors

rvecs and tvecs are not pointers anymore

no extra lambda

newObjPoints: no pointers

stdDevs: no pointers

_Jo removed: not used

Range::all() -> rowRange, colRange

param and mask are std::vectors now

indices shortened

tabs

less func-scoped vars; TODOs

less formatting & renaming changes

trailing whitespaces

less diff

less changes

less changes

Range::all() back

perViewErr ptr fix

NINTRINSIC captured

try to fix warning

trying to fix a warning

fix warnings, another attempt
2022-09-15 22:55:40 +02:00
Rostislav Vasilikhin
b1020639f1 perViewErr fix 2022-09-09 17:40:26 +02:00
Rostislav Vasilikhin
a8b4ffac50 volatile variable made mask-fixed as it should be 2022-09-05 18:42:17 +02:00
Rostislav Vasilikhin
8a43956a1b less pointers
rtsort + formatting

less pointers + more compact code

less reallocations, cleaner code

less pointers, less GEMMs

trailing whitespace
2022-09-05 18:42:15 +02:00
Rostislav Vasilikhin
bfc4bdd9d0 regression test added
test data moved to opencv_extra, loads from yaml.gz file now
2022-09-05 18:42:12 +02:00
Rostislav Vasilikhin
96e2d32618 fixing broken stereo calibration 2022-09-05 18:42:12 +02:00
Rostislav Vasilikhin
487619e5fe no address arithmetics
less address arithmetics

happy valgrind: copy recomputed intrinsics only
2022-09-05 18:42:09 +02:00
Alexander Alekhin
c25f776151 Merge branch 4.x 2022-08-21 15:27:31 +00:00
OpenCV Developers
0fbd58bef9 Merge branch 4.x 2022-04-23 22:07:14 +00:00