Commit Graph

182 Commits

Author SHA1 Message Date
Thang Tran
2f7fc1a598 calib3d: add find4QuadCornerSubpix java wrapper
Fixes: https://github.com/opencv/opencv/issues/14169
2019-04-24 08:45:28 +02:00
Bharat123Rox
ea68f7ea1e Remove dead link in calib3d.hpp 2019-03-21 07:41:32 +05:30
catree
bbf39b0964 Add Hand-Eye calibration methods (Tsai, Park, Horaud, Andreff, Daniilidis). 2019-03-05 14:51:33 +01:00
Alexander Alekhin
2268ed1b6e Merge pull request #12948 from catree:add_drawFrameAxes 2018-10-30 13:33:01 +00:00
catree
d37164bab6 Fix distortion figure in calib3d. Positive radial distortion corresponds to pincushion distortion and negative to barrel distortion. Add another figure that illustrates the influence of k1 in the distortion effect. 2018-10-26 20:27:37 +02:00
kamino410
3972c526ce fix document about camera distortion parameters 2018-10-26 19:55:46 +09:00
catree
644846c702 Add a function that draws frame axes. Useful for debugging purpose and to check the correctness of the output of a pose estimation method. 2018-10-25 18:38:19 +02:00
Alexander Alekhin
31fef14d76 Merge pull request #12136 from sturkmen72:update_documentation 2018-08-17 14:02:20 +00:00
Suleyman TURKMEN
c61bc3a0cb Update documentation and samples 2018-08-17 14:21:29 +03:00
Tomoaki Teshima
f0c46a4c74 fix typo 2018-08-16 19:11:40 +09:00
Vadim Pisarevsky
75ee536d6d
Filter homography decomp: updated PR #7153 (#11846)
* Add functionality to filter homography decompositions

* documentation + small refactor

* fix comparing int to size_t (compiler warning)

* fix whitespace issues

* clarification of function return values in documentation

* refactor of function parameters and change in loop nesting

* cleanup useless .h, fix size_t to int compare, small refactor

* fix documentation and whitespace

* change output from return value to outputarray parameter

* update function docs to reflect changes in parameters

* whitespace

* failing test

* fixed warnings related to extended initialisers and improper types

* initialize vectors from arrays

* initialize vectors from arrays part 2

* fix whitespace

* fix trailing whitespace

* Include <inttypes.h> in test_filter_homography_decomp.cpp, should fix 'uint8_t' : undeclared identifier error

* updated the test (made it shorter and providing better diagnostic) and significantly improved implementation (get rid of heavy repeated and/or unnecessary operations)

* fixed compile warning; removed trailing whitespace
2018-06-27 16:47:35 +03:00
Pavel Rojtberg
203dc3bb48 Merge pull request #10667 from paroj:stereo_calib_ex
calib3d: add stereoCalibrateExtended (#10667)

* cvCalibrateCamera2Internal: simplify per view error computation

* calib3d: add stereoCalibrateExtended

- allow CALIB_USE_EXTRINSIC_GUESS
- returns per view errors

* calib3d: add stereoCalibrateExtended test
2018-01-26 22:05:13 +03:00
Fangjun Kuang
eb2901bd69 Improve the doc for fundamental matrix. 2018-01-19 13:41:47 +01:00
Fangjun Kuang
67842df9e2 Improve the documentation for affine transform estimation. 2018-01-18 19:54:18 +01:00
catree
87160cb297 Add Demo 5: Basic panorama stitching from a rotating camera in the homography tutorial. 2017-12-19 22:45:35 +01:00
Suleyman TURKMEN
1654dfe3a9 Update samples (#10333)
* Update samples

* Update calib3d.hpp

* Update calib3d.hpp

* Update calib3d.hpp

* Update calib3d.hpp
2017-12-18 13:44:11 +03:00
catree
fcb537bacd Add a figure and some formulas to illustrate the PnP pose estimation principle. 2017-12-17 21:38:22 +01:00
catree
2e56a47f8c Allow to use 3 points in SolvePnP if SOLVEPNP_ITERATIVE and useExtrinsicGuess==true. Add bibtex citations for P3P. Update SolvPnP tests. 2017-11-28 15:04:59 +01:00
Fakabbir Amin
a0c658b012 Merge pull request #9979 from fakabbir:ImproveDoc
* Improve Documentation
Fixes Spelling Mistakes.
2017-11-08 16:55:48 +00:00
KUANG Fangjun
67acfc6e25 improve doc. 2017-10-31 10:30:01 +01:00
Pavel Rojtberg
629a06d9b6 calib3d: export parameters of CALIB_CB_CLUSTERING 2017-10-02 14:27:32 +02:00
Vladislav Sovrasov
ef7833a271 calib3d: add CALIB_FIX_TANGENT_DIST flag to stereoCalibrate 2017-08-25 13:05:16 +03:00
Alexander Alekhin
dcb3c4ff1e Merge pull request #9189 from tomoaki0705:fixCalib3dRandom 2017-07-20 12:24:34 +00:00
Tomoaki Teshima
46bee83005 fix the test fail on Calib3d_SolvePnP.accuracy
* move array size to enum
  * move array size to member variable
  * loosen the eps of SOLVEPNP_P3P
  * loosen the eps in Calib3d_SolveP3P.accuracy
2017-07-20 06:32:32 +09:00
catree
98c78e0acd Use directly solvePnP when the number of input points is equal to the number of model points. Enable useExtrinsicGuess parameter. Return rvec and tvec estimated using all the inliers instead of the best rvec and tvec estimated during the Minimal Sample Sets step. Document the behavior of solvePnPRansac. 2017-07-05 13:17:38 +02:00
Tong Ke
8088d6785a Merge pull request #8585 from tonyke1993:ap3p
Enable p3p and ap3p in solvePnPRansac (#8585)

* add paper info

* allow p3p and ap3p being RANSAC kernel

* keep previous code

* apply catrees comment

* fix getMat

* add comment

* add solvep3p test

* test return value

* fix warnings
2017-06-28 15:27:30 +03:00
Vladislav Sovrasov
d121d1c528 calib3d: add CALIB_FIX_TANGENT_DIST flag 2017-06-13 19:40:49 +03:00
catree
542cdb2c39 Improve solvePnP doc, add assert >= 4 in solvePnP, escape underscore character for Scalar_ documentation.
Add reference to SOLVEPNP_ITERATIVE in the doc.
2017-05-29 14:59:14 +02:00
Vladislav Sovrasov
bf8415283a calib3d: replace defines with enum values 2017-05-24 15:50:41 +03:00
Vadim Pisarevsky
dea5eaca30 Merge pull request #8660 from 4ekmah:making_sgbm_parallel 2017-05-03 13:47:36 +00:00
jveitchmichaelis
369bfbfd23 Add default parameters for SGBM::create
Added default parameters for minDisparity, numDisparities and blockSize. This fixes a bug where SGBM::load would not compile.
2017-04-30 16:32:30 +01:00
Pyotr Chekmaryov
7ffa49e02c Vertical passes added and we have working parralel version. 2017-04-22 00:00:08 +00:00
Pyotr Chekmaryov
20036b82d3 There added parallel realization of vertical passes for MODE_HH4. 2017-04-15 21:51:15 +00:00
Tong Ke
0a63ab36bb Merge pull request #8301 from tonyke1993:p3p_alg
New p3p algorithm (accepted by CVPR 2017) (#8301)

* add p3p source code

* indent 4

* update publication info

* fix filename

* interface done

* plug in done, test needed

* debugging

* for test

* a working version

* clean p3p code

* test

* test

* fix warning, blank line

* apply patch from @catree

* add reference info

* namespace, indent 4

* static solveQuartic

* put small functions to anonymous namespace
2017-04-07 09:48:34 +03:00
Pyotr Chekmaryov
106413a3ea Simplest test added and code debuged. 2017-03-27 21:40:17 +00:00
q
2918c3d75a First occurence of 4-directional version of SGBM.
Even without any tests.
Next step is parallelising it.
2017-03-21 14:51:19 +00:00
Alexander Alekhin
aa5204958e Merge pull request #8279 from sovrasov:calib3d_new_recover_pose 2017-03-06 10:20:43 +00:00
Hans Gaiser
11b24eb49f Expose CirclesGridFinderParameters in findCirclesGrid. 2017-03-02 10:53:45 +01:00
Vladislav Sovrasov
710506e9e2 calib3d: add a new overload for recoverPose 2017-02-27 13:26:04 +03:00
Duncan Barber
1c3b9d7591 Tiny documentation fix in stereoCalibrate
Modified the (R2,T2) computation documentation in the stereoCalibrate function documentation to display on two lines for clarity
2017-01-04 21:24:25 +00:00
catree
a93c70f533 Add note about solvePnP methods that cannot be used.
Add note: SOLVEPNP_EPNP will be used instead of SOLVEPNP_DLS and instead of SOLVEPNP_UPNP.
2016-12-09 13:15:52 +01:00
Pavel Rojtberg
e1503cc29e calibrateCamera: specifiy what kind of re-projection error is returned 2016-11-24 14:02:01 +01:00
Jiri Horner
c17afe0fab Merge pull request #6933 from hrnr:gsoc_all
[GSOC] New camera model for stitching pipeline

* implement estimateAffine2D

estimates affine transformation using robust RANSAC method.

* uses RANSAC framework in calib3d
* includes accuracy test
* uses SVD decomposition for solving 3 point equation

* implement estimateAffinePartial2D

estimates limited affine transformation

* includes accuracy test

* stitching: add affine matcher

initial version of matcher that estimates affine transformation

* stitching: added affine transform estimator

initial version of estimator that simply chain transformations in homogeneous coordinates

* calib3d: rename estimateAffine3D test

test Calib3d_EstimateAffineTransform rename to Calib3d_EstimateAffine3D. This is more descriptive and prevents confusion with estimateAffine2D tests.

* added perf test for estimateAffine functions

tests both estimateAffine2D and estimateAffinePartial2D

* calib3d: compare error in square in estimateAffine2D

* incorporates fix from #6768

* rerun affine estimation on inliers

* stitching: new API for parallel feature finding

due to ABI breakage new functionality is added to `FeaturesFinder2`, `SurfFeaturesFinder2` and `OrbFeaturesFinder2`

* stitching: add tests for parallel feature find API

* perf test (about linear speed up)
* accuracy test compares results with serial version

* stitching: use dynamic_cast to overcome ABI issues

adding parallel API to FeaturesFinder breaks ABI. This commit uses dynamic_cast and hardcodes thread-safe finders to avoid breaking ABI.

This should be replaced by proper method similar to FeaturesMatcher on next ABI break.

* use estimateAffinePartial2D in AffineBestOf2NearestMatcher

* add constructor to AffineBestOf2NearestMatcher

* allows to choose between full affine transform and partial affine transform. Other params are the as for BestOf2NearestMatcher
* added protected field

* samples: stitching_detailed support affine estimator and matcher

* added new flags to choose matcher and estimator

* stitching: rework affine matcher

represent transformation in homogeneous coordinates

affine matcher: remove duplicite code
rework flow to get rid of duplicite code

affine matcher: do not center points to (0, 0)
it is not needed for affine model. it should not affect estimation in any way.

affine matcher: remove unneeded cv namespacing

* stitching: add stub bundle adjuster

* adds stub bundle adjuster that does nothing
* can be used in place of standard bundle adjusters to omit bundle adjusting step

* samples: stitching detailed, support no budle adjust

* uses new NoBundleAdjuster

* added affine warper

* uses R to get whole affine transformation and propagates rotation and translation to plane warper

* add affine warper factory class

* affine warper: compensate transformation

* samples: stitching_detailed add support for affine warper

* add Stitcher::create method

this method follows similar constructor methods and returns smart pointer. This allows constructing Stitcher according to OpenCV guidelines.

* supports multiple stitcher configurations (PANORAMA and SCANS) for convenient setup
* returns cv::Ptr

* stitcher: dynamicaly determine correct estimator

we need to use affine estimator for affine matcher

* preserves ABI (but add hints for ABI 4)
* uses dynamic_cast hack to inject correct estimator

* sample stitching: add support for multiple modes

shows how to use different configurations of stitcher easily (panorama stitching and scans affine model)

* stitcher: find features in parallel

use new FeatureFinder API to find features in parallel. Parallelized using TBB.

* stitching: disable parallel feature finding for OCL

it does not bring much speedup to run features finder in parallel when OpenCL is enabled, because finder needs to wait for OCL device.

Also, currently ORB is not thread-safe when OCL is enabled.

* stitching: move matcher tests

move matchers tests perf_stich.cpp -> perf_matchers.cpp

* stitching: add affine stiching integration test

test basic affine stitching (SCANS mode of stitcher) with images that have only translation between them

* enable surf for stitching tests

stitching.b12 test was failing with surf

investigated the issue, surf is producing good result. Transformation is only slightly different from ORB, so that resulting pano does not exactly match ORB's result. That caused sanity check to fail.

* added size checks similar to other tests
* sanity check will be applied only for ORB

* stitching: fix wrong estimator choice

if case was exactly wrong, estimators were chosen wrong

added logging for estimated transformation

* enable surf for matchers stitching tests

* enable SURF
* rework sanity checking. Check estimated transform instead of matches. Est. transform should be more stable and comparable between SURF and ORB.
* remove regression checking for VectorFeatures tests. It has a lot if data andtest is the same as previous except it test different vector size for performance, so sanity checking does not add any value here. Added basic sanity asserts instead.

* stitching tests: allow relative error for transform

* allows .01 relative error for estimated homography sanity check in stitching matchers tests
* fix VS warning

stitching tests: increase relative error

increase relative error to make it pass on all platforms (results are still good).

stitching test: allow bigger relative error

transformation can differ in small values (with small absolute difference, but large relative difference). transformation output still looks usable for all platforms. This difference affects only mac and windows, linux passes fine with small difference.

* stitching: add tests for affine matcher

uses s1, s2 images. added also new sanity data.

* stitching tests: use different data for matchers tests

this data should yeild more stable transformation (it has much more matches, especially for surf). Sanity data regenerated.

* stitching test: rework tests for matchers

* separated rotation and translations as they are different by scale.
* use appropriate absolute error for them separately. (relative error does not work for values near zero.)

* stitching: fix affine warper compensation

calculation of rotation and translation extracted for plane warper was wrong

* stitching test: enable surf for opencl integration tests

* enable SURF with correct guard (HAVE_OPENCV_XFEATURES2D)
* add OPENCL guard and correct namespace as usual for opencl tests

* stitching: add ocl accuracy test for affine warper

test consistent results with ocl on and off

* stitching: add affine warper ocl perf test

add affine warper to existing warper perf tests. Added new sanity data.

* stitching: do not overwrite inliers in affine matcher

* estimation is run second time on inliers only, inliers produces in second run will not be therefore correct for all matches

* calib3d: add Levenberg–Marquardt refining to estimateAffine2D* functions

this adds affine Levenberg–Marquardt refining to estimateAffine2D functions similar to what is done in findHomography.

implements Levenberg–Marquardt refinig for both full affine and partial affine transformations.

* stitching: remove reestimation step in affine matcher

reestimation step is not needed. estimateAffine2D* functions are running their own reestimation on inliers using the Levenberg-Marquardt algorithm, which is better than simply rerunning RANSAC on inliers.

* implement partial affine bundle adjuster

bundle adjuster that expect affine transform with 4DOF. Refines parameters for all cameras together.

stitching: fix bug in BundleAdjusterAffinePartial

* use the invers properly
* use static buffer for invers to speed it up

* samples: add affine bundle adjuster option to stitching_detailed

* add support for using affine bundle adjuster with 4DOF
* improve logging of initial intristics

* sttiching: add affine bundle adjuster test

* fix build warnings

* stitching: increase limit on sanity check

prevents spurious test failures on mac. values are still pretty fine.

* stitching: set affine bundle adjuster for SCANS mode

* fix bug with AffineBestOf2NearestMatcher (we want to select affine partial mode)
* select right bundle adjuster

* stitching: increase error bound for matcher tests

* this prevents failure on mac. tranformation is still ok.

* stitching: implement affine bundle adjuster

* implements affine bundle adjuster that is using full affine transform
* existing test case modified to test both affinePartial an full affine bundle adjuster

* add stitching tutorial

* show basic usage of stitching api (Stitcher class)

* stitching: add more integration test for affine stitching

* added new datasets to existing testcase
* removed unused include

* calib3d: move `haveCollinearPoints` to common header

* added comment to make that this also checks too close points

* calib3d: redone checkSubset for estimateAffine* callback

* use common function to check collinearity
* this also ensures that point will not be too close to each other

* calib3d: change estimateAffine* functions API

* more similar to `findHomography`, `findFundamentalMat`, `findEssentialMat` and similar
* follows standard recommended semantic INPUTS, OUTPUTS, FLAGS
* allows to disable refining
* supported LMEDS robust method (tests yet to come) along with RANSAC
* extended docs with some tips

* calib3d: rewrite estimateAffine2D test

* rewrite in googletest style
* parametrize to test both robust methods (RANSAC and LMEDS)
* get rid of boilerplate

* calib3d: rework estimateAffinePartial2D test

* rework in googletest style
* add testing for LMEDS

* calib3d: rework estimateAffine*2D perf test

* test for LMEDS speed
* test with/without Levenberg-Marquart
* remove sanity checking (this is covered by accuracy tests)

* calib3d: improve estimateAffine*2D tests

* test transformations in loop
* improves test by testing more potential transformations

* calib3d: rewrite kernels for estimateAffine*2D functions

* use analytical solution instead of SVD
* this version is faster especially for smaller amount of points

* calib3d: tune up perf of estimateAffine*2D functions

* avoid copying inliers
* avoid converting input points if not necessary
* check only `from` point for collinearity, as `to` does not affect stability of transform

* tutorials: add commands examples to stitching tutorials

* add some examples how to run stitcher sample code
* mention stitching_detailed.cpp

* calib3d: change computeError for estimateAffine*2D

* do error computing in floats instead of doubles

this have required precision + we were storing the result in float anyway. This make code faster and allows auto-vectorization by smart compilers.

* documentation: mention estimateAffine*2D function

* refer to new functions on appropriate places
* prefer estimateAffine*2D over estimateRigidTransform

* stitching: add camera models documentations

* mention camera models in module documentation to give user a better overview and reduce confusion
2016-10-22 19:10:42 +03:00
catree
ce7811e5dd Add distortion example images for calib3d documentation. 2016-10-09 20:35:58 +02:00
StevenPuttemans
524c61279b replace principle by principal 2016-10-06 14:09:26 +02:00
Alexander Alekhin
1c18b1d245 Merge pull request #7370 from souch55:Fixxn 2016-10-01 10:44:56 +00:00
sourin
a34fbf7bb1 Fixed identifiers warns 2016-09-30 15:16:29 +05:30
Vladislav Sovrasov
dfe4519c07 Add QR decomposition to HAL 2016-09-05 18:20:04 +03:00
Suleyman TURKMEN
fcc28fecb6 Make Up 2016-08-23 22:17:30 +03:00
catree
6e931aaab7 Add pinhole camera model illustration in calib3d documentation. 2016-08-01 02:25:45 +02:00