Commit Graph

1298 Commits

Author SHA1 Message Date
Alexander Alekhin
8b4fa2605e Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-03 12:32:49 +00:00
yuki takehara
a6277370ca
Merge pull request #21107 from take1014:remove_assert_21038
resolves #21038

* remove C assert

* revert C header

* fix several points in review

* fix test_ds.cpp
2021-11-27 18:34:52 +00:00
Alexander Alekhin
6a2077cbd8 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-23 15:33:31 +00:00
Wehzie
f9e747dbc6 Fixed typo in CV_Error message
Error was "Input parameters must be a matrices!", but "matrices" is plural and doesn't allow the unspecific article "a".
2021-10-17 15:37:14 +03:00
Alexander Panov
982745fb83
Merge pull request #20735 from AleksandrPanov:radon_checkerboard
generate radon checkerboard

* added _make_round_rect

* added round rect to make_checkerboard_pattern

* added markers

* update docs

* removed links to findChessboardCornersSB() and added checks to markers
2021-09-28 10:30:07 +03:00
thezane
9e835e8edb
Merge pull request #20636 from thezane:recoverPoseFromDifferentCameras
Recover pose from different cameras (version 2)

* add recoverPose for two different cameras

* Address review comments from original PR

* Address new review comments

* Rename private api

Co-authored-by: tompollok <tom.pollok@gmail.com>
Co-authored-by: Zane <zane.huang@mail.utoronto.ca>
2021-09-25 17:42:12 +00:00
Alexander Alekhin
2ed5cba110 build: eliminate build warnings 2021-08-29 09:18:21 +00:00
Francesco Petrogalli
d29c7e7871
Merge pull request #20392 from fpetrogalli:aarch64-semihosting
AArch64 semihosting

* [ts] Disable filesystem support in the TS module.

Because of this change, all the tests loading data will file, but tat
least the core module can be tested with the following line:

    opencv_test_core --gtest_filter=-"*Core_InputOutput*:*Core_globbing.accuracy*"

* [aarch64] Build OpenCV for AArch64 semihosting.

This patch provide a toolchain file that allows to build the library
for semihosting applications [1]. Minimal changes have been applied to
the code to be able to compile with a baremetal toolchain.

[1] https://developer.arm.com/documentation/100863/latest

The option `CV_SEMIHOSTING` is used to guard the bits in the code that
are specific to the target.

To build the code:

    cmake ../opencv/ \
        -DCMAKE_TOOLCHAIN_FILE=../opencv/platforms/semihosting/aarch64-semihosting.toolchain.cmake \
        -DSEMIHOSTING_TOOLCHAIN_PATH=/path/to/baremetal-toolchain/bin/ \
        -DBUILD_EXAMPLES=ON -GNinja

A barematel toolchain for targeting aarch64 semihosting can be found
at [2], under `aarch64-none-elf`.

[2] https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads

The folder `samples/semihosting` provides two example semihosting
applications.

The two binaries can be executed on the host platform with:

    qemu-aarch64 ./bin/example_semihosting_histogram
    qemu-aarch64 ./bin/example_semihosting_norm

Similarly, the test and perf executables of the modules can be run
with:

    qemu-aarch64 ./bin/opecv_[test|perf]_<module>

Notice that filesystem support is disabled by the toolchain file,
hence some of the test that depend on filesystem support will fail.

* [semihosting] Remove blank like at the end of file. [NFC]

The spurious blankline was reported by
https://pullrequest.opencv.org/buildbot/builders/precommit_docs/builds/31158.

* [semihosting] Make the raw pixel file generation OS independent.

Use the facilities provided by Cmake to generate the header file
instead of a shell script, so that the build doesn't fail on systems
that do not have a unix shell.

* [semihosting] Rename variable for semihosting compilation.

* [semihosting] Move the cmake configuration to a variable file.

* [semihosting] Make the guard macro private for the core module.

* [semihosting] Remove space. [NFC]

* [semihosting] Improve comment with information about semihosting. [NFC]

* [semihosting] Update license statement on top of sourvce file. [NFC]

* [semihosting] Replace BM_SUFFIX with SEMIHOSTING_SUFFIX. [NFC]

* [semihosting] Remove double space. [NFC]

* [semihosting] Add some text output to the sample applications.

* [semihosting] Remove duplicate entry in cmake configuration. [NFCI]

* [semihosting] Replace `long` with `int` in sample apps. [NFCI]

* [semihosting] Use `configure_file` to create the random pixels. [NFCI]

* [semihosting][bugfix] Fix name of cmakedefine variable.

* [semihosting][samples] Use CV_8UC1 for grayscale images. [NFCI]

* [semihosting] Add readme file.

* [semihosting] Remove blank like at the end of README. [NFC]

This fixes the failure at
https://pullrequest.opencv.org/buildbot/builders/precommit_docs/builds/31272.
2021-07-21 18:46:05 +03:00
Vincent Rabaud
b68057d927 Do not use = 0 for a cv::Mat.
There are several operator= overloads and some compilers can be confused.
2021-06-23 21:30:06 +02:00
Ian Maquignaz
464441d8c3 Added new unit test for initInverseRectificationMap()
Function is validated. Included an update to DISABLED_Calib3d_InitInverseRectificationMap.

Includes updates per input from @alalek and unit test regression # to reflect PR #
2021-06-17 12:48:16 -04:00
Ian Maquignaz
2db243b8ed
Merge pull request #20247 from IanMaquignaz:inverseRectification_update
Update to initInverseRectificationMap()

* update to initInverseRectificationMap() documentation

* Restructured Calib3d_InitInverseRectificationMap unit test per feedback from alalek

* whitespace
2021-06-09 13:27:43 +00:00
Vadim Pisarevsky
6f2a64a511 Merge pull request #20235 from IanMaquignaz:calib3d_update_hyperlinks 2021-06-08 13:27:12 +00:00
Ian Maquignaz
b05631432b Added declaration, definition and unit test for initInverseRectificationMap()
Fixed trailing whitespace

Update to initInverseRectificationMap documentation for clarity

Added test case for initInverseRectificationMap()
Updated documentation.

Fixed whitespace error in docs

Small update to test function
Now passes success_error_level

final update to inverseRectification documentation
2021-06-07 16:01:11 -04:00
Ian Maquignaz
dc92886ab6 Added markup to enable hyperlinking of functions in calib3d documentation
fixed find*, calibrate*, stereo*

fixed decompose*, convert*

Fixed recoverPose, and projectPoints

Fixed typo in docs which resulted in a docs warning
2021-06-07 15:52:22 -04:00
Vadim Pisarevsky
cc712a165d Merge pull request #19689 from andy-held:umeyama 2021-05-25 13:18:21 +00:00
Maksym Ivashechkin
527d86a93d
Merge pull request #20012 from ivashmak:bugfix_solvepnp
* fix inliers in solvePnPRansac

* fix inliers in test_usac

* fix inliers in test_usac
2021-05-19 12:09:46 +03:00
Alexander Alekhin
170bf6d7af Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-05-01 09:44:24 +00:00
Guillaume Jacob
9f3e83baf6 calib3d: Update documentation of calibrateCamera
- Added missing documentation for the CALIB_FIX_FOCAL_LENGTH flag
- Removed erroneous information about the number of distortion coefficients
returned
- Added some missing @ref tags
2021-04-30 20:34:04 +02:00
Andreas Franek
4ed91ce7ed add estimateAffine3D overload that implements Umeyama's algorithm 2021-04-28 11:33:48 +02:00
Alexander Alekhin
29fb4f98b1 Merge pull request #19942 from berak:calib3d_fix_usac_mask 2021-04-20 19:49:20 +00:00
berak
3386efddba calib3d: fix masks for usac 2021-04-20 11:57:42 +02:00
Alexander Alekhin
68d15fc62e Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-04-08 11:23:24 +00:00
Tiago De Gaspari
9f295b2c91 Expose maxIters in findEssentialMat
Lets the user choose the maximum number of iterations the robust
estimator runs for, similary to findFundamentalMat
and findHomography functions.
2021-04-07 00:07:33 -03:00
Tiago De Gaspari
ac9182f20d Add maxIters parameter to LMeDS method in findFundamentalMat
This commit passes the parameter maxIters that represent
the maximum number of iterations, that can be passed to findFundamentalMat
to the method LMeDS.

This parameter were added to the function findFundamentalMat and
were passed just for the RANSAC method, but should be passed to
both methods to be consistent.
2021-04-03 21:56:05 -03:00
Alexander Alekhin
b19f860384 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-03-13 13:02:18 +00:00
Xinguang Bian
b995de4ff3
Merge pull request #19253 from mightbxg:bugfix_PnPRansac
* fix unexpected Exception in solvePnPRansac caused by input points

* calib3d: solvePnPRansac - keep minimal changes to handle DLT 6 points requirement

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-03-12 00:53:06 +03:00
Dan Ben Yosef
63048812c7 Init params (StereoSGBMParams) in StereoSGBMImpl constructor initialization list
To improve preformence it is better to init the params (StereoSGBMParams) in the
    initialization list.
2021-03-10 13:05:35 -05:00
Dan Ben-Yosef
31f66766b7
Merge pull request #19685 from danbey:setting_stereoBMImpl_in_init_list
Init params (StereoBMParams) in StereoBMImpl constructor initialization list

* Init StereoBMImpl in initialization list

To improve preformence it is better to init the params (StereoBMImpl) in the
initialization list.

* coding style

* drop useless copy/move ctor

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-03-07 20:06:08 +03:00
Alexander Alekhin
d643a90efa Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-03-06 17:31:08 +00:00
cyy
b450dd7a87
Merge pull request #19565 from cyyever:minor_fix
Local objects optimization in calibration init

* use emplace_back

* use {} initilization

* remove a tailing white space
2021-03-05 15:04:51 +00:00
Mradul Agrawal
640f188ca2
Merge pull request #19583 from theroyalpekka:patch-1
* Update polynom_solver.cpp

This pull request is in the response to Issue  #19526. I have fixed the problem with the cube root calculation of 2*R. The Issue was in the usage of pow function with negative values of R, but if it is calculated for only positive values of R then changing x0 according to the parity of R, the Issue is resolved. Kindly consider it, Thanks!

* add cv::cubeRoot(double)

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-03-05 13:55:52 +00:00
Alexander Smorkalov
e2ca50f1cb
Merge pull request #19539 from asmorkalov:as/calib_fix_focal_length
* Added CALIB_FIX_FOCAL_LENGTH to fisheye calibration #13450

Sometimes you want to calibrate just the principal point of a camera, or just the distortion coefficients. In this case, you can pass the CALIB_FIX_FOCAL_LENGTH flag to keep Fx and Fy

* Added test for CALIB_FIX_FOCAL_LENGTH option in fisheye callinration.
2021-03-03 14:06:59 +00:00
Alexander Alekhin
f70e80a6ba
Merge pull request #19640 from alalek:issue_19639
calib3d(usac): do not crash on empty models

* calib3d(test): regression test for issue 19639

* calib3d(usac): do not crash in setModelParameters()

* calib3d(usac): handle empty models in isModelGood()
2021-02-28 21:39:30 +00:00
Maksim Shabunin
b2321576bc Fixed several issues found by static analysis 2021-02-25 15:44:15 +03:00
Maksim Shabunin
dd5976162b Fixed several issues found by static analysis 2021-02-25 15:08:39 +03:00
Alexander Alekhin
0a6f216f83 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-02-21 20:14:09 +00:00
Matt Alvarado
0a7a54f312
Merge pull request #19498 from mattalvarado:fix_findcirclesgrid
* Properly handle empty centers in findCirclesGrid

* Address alalek comments. Add unit test to validate bugfix

* fix build warnings, remove unrelated comment
2021-02-16 16:18:43 +00:00
Ian Maquignaz
378a634de8 Updated Calib3d documentation to fix missing @ref in master 2020-12-28 10:57:19 -05:00
Alexander Alekhin
624d532000 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-12-17 21:05:34 +00:00
Alexander Alekhin
94e7be3714 docs(calib3d): avoid reference on legacy C API constants 2020-12-17 21:03:27 +00:00
Ian Maquignaz
085a131801 Applied '@ref' linking for 3.4 Calib3D parameters and added enum cv::fisheye::CALIB_ZERO_DISPARITY == cv::CALIB_ZERO_DISPARITY == 0x400 == 1 << 10.
Fisheye test has been updated to use new enum cv::fisheye::CALIB_ZERO_DISPARITY and included CV_StaticAssert(...) to ensure cv::CALIB_ZERO_DISPARITY == cv::fisheye::CALIB_ZERO_DISPARITY.
2020-12-15 12:33:43 -05:00
Alexander Alekhin
dd1494eebf Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-12-11 19:27:20 +00:00
Alexander Alekhin
175cd03ff2 calib3d: fix findCirclesGrid hang
- detect case with infinite loop and raise NoConv exception
- handle such exception
- add support for case with missing `blobDetector` (image contains Point2f array of candidates)
- add regression test
- undone rectification for "failed" detections too
- drop redirectError() usage
2020-12-11 07:31:50 +00:00
Alexander Alekhin
6fdb7aee84 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-12-04 18:26:58 +00:00
Alexander Alekhin
12a36b5a94 Merge pull request #18955 from alalek:test_debug_flag 2020-12-04 18:10:00 +00:00
Randall Britten
7f3ba5963d Fixed minor typo "poins" in documentation page 2020-12-03 12:46:23 +03:00
Alexander Alekhin
da2978f607 ts: cvtest::debugLevel / --test_debug=<N> option 2020-11-28 13:13:28 +00:00
Alexander Alekhin
bc434e8f67 calib3d: eliminate 'register' build warning 2020-11-20 20:32:59 +00:00
Alexander Alekhin
0105f8fa38 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-11-20 20:32:00 +00:00
Nathan Godwin
2255973b0f
Merge pull request #18371 from nathanrgodwin:sqpnp_dev
Added SQPnP algorithm to SolvePnP

* Added sqpnp

* Fixed test case

* Added fix for duplicate point checking and inverse func reuse

* Changes for 3x speedup

Changed norm method (significant speed increase), changed nearest rotation computation to FOAM

* Added symmetric 3x3 inverse and unrolled loops

* Fixed error with SVD

* Fixed error from with indices

Indices were initialized negative. When nullspace is large, points coplanar, and rotation near 0, indices not changed.
2020-11-20 11:25:17 +00:00