Commit Graph

60 Commits

Author SHA1 Message Date
catree
165bf25c46 Fix typo with cameramatrix command for documentation.
Fix link for "RANSAC for Dummies" tutorial.
2024-09-01 01:03:57 +02:00
Mironov Arseny
b964943517
Merge pull request #25607 from Fest1veNapkin:imgproc_approx_bounding_poly
Add a new function that approximates the polygon bounding a convex hull with a certain number of sides #25607

merge PR with <https://github.com/opencv/opencv_extra/pull/1179>

This PR is based on the paper [View Frustum Optimization To Maximize Object’s Image Area](https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=1fbd43f3827fffeb76641a9c5ab5b625eb5a75ba).

# Problem
I needed to reduce the number of vertices of the convex hull so that the additional area was minimal, andall vertices of the original contour enter the new contour.

![image](https://github.com/Fest1veNapkin/opencv/assets/98156294/efac35f6-b8f0-46ec-91e4-60800432620c)

![image](https://github.com/Fest1veNapkin/opencv/assets/98156294/2292d9d7-1c10-49c9-8489-23221b4b28f7)

# Description
Initially in the contour of n vertices, at each stage we consider the intersection points of the lines formed by each adjacent edges. Each of these intersection points will form a triangle with vertices through which lines pass. Let's choose a triangle with the minimum area and merge the two vertices at the intersection point. We continue until there are more vertices than the specified number of sides of the approximated polygon.
![image](https://github.com/Fest1veNapkin/opencv/assets/98156294/b87b21c4-112e-450d-a776-2a120048ca30)

# Complexity:
Using a std::priority_queue or std::set  time complexity is **(O(n\*ln(n))**, memory **O(n)**,
n - number of vertices in convex hull.

count of sides - the number of points by which we must reduce.
![image](https://github.com/Fest1veNapkin/opencv/assets/98156294/31ad5562-a67d-4e3c-bdc2-29f8b52caf88)

## Comment
If epsilon_percentage more 0, algorithm can return more values than _side_.
Algorithm returns OutputArray. If OutputArray.type() equals 0, algorithm returns values with InputArray.type().
New test uses image which are not in opencv_extra, needs to be added.

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] 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-07-09 17:11:23 +03:00
Maksym Ivashechkin
f85cf5d7f9 Update usac tutorial. 2023-11-08 12:53:20 +03:00
Alex
c12e1ecb86 update aruco bytesList docs 2023-07-13 13:50:07 +03:00
Alexander Alekhin
18cbfa4a4f Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2023-01-23 00:11:12 +00:00
Ihsan Soydemir
6a7d54f550
Merge pull request #23128 from Isydmr:update-fastNlMeansDenoising-documentation
Fix broken paper link for fastNlMeansDenoising

* Fix broken link

* Move citation to `opencv.bib`

* Cite researchgate reference

* Correct citation label

* Use semantic scholar BibTex
2023-01-12 19:54:40 +03:00
Alexander Alekhin
5d14cc68b7 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-11-16 16:54:11 +00:00
catree
c7d24c0fb3 Fix AKAZE bib reference using dblp.org and bmva.org sources. 2022-10-19 13:55:33 +02:00
Alexander Alekhin
2a4926f417 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-06-26 14:22:24 +00:00
catree
a04f9e7a59 Add more references. Update missing references with webarchive. Use mathbf for matrices. Check that the determinant of the rotation matrix is not negative (reflection), and correct it if it is the case. 2022-06-19 01:27:32 +02:00
Alexander Alekhin
583bd1a6e2 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-06-04 19:10:35 +00:00
Victor
1230075011
Merge pull request #22045 from victor1234:calib3d-fisheye-model-reference
* Add fisheye camera model summary description with reference

* Fix layout

* Move reference to bibtex
2022-05-30 18:03:08 +00:00
Alexander Alekhin
217fea9667 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-24 16:48:07 +00:00
catree
032a61b197 Summarize PnP pose computation on a single separate page. 2021-12-23 19:52:14 +01:00
Alexander Alekhin
80492d663e Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-18 16:19:06 +00:00
Stefano Allegretti
91817bffe1
Merge pull request #21275 from stal12:CCL_improvements
Improve CCL with new algorithms and tests

* Improve CCL with new algorithms and tests

* Split CCL test into dedicated tests cases
2021-12-17 19:36:57 +00:00
Vadim Pisarevsky
cc712a165d Merge pull request #19689 from andy-held:umeyama 2021-05-25 13:18:21 +00:00
Alexander Alekhin
ae4cc404c1 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-05-23 21:21:48 +00:00
catree
c621384707 Use correct BibTeX syntax for month field. 2021-05-19 14:24:07 +02:00
Andreas Franek
4ed91ce7ed add estimateAffine3D overload that implements Umeyama's algorithm 2021-04-28 11:33:48 +02:00
Alexander Alekhin
e0265c67c6 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-02-27 17:41:57 +00:00
Federico Bolelli
9695165877
Merge pull request #19631 from prittt:sota-ccl
* Add Spaghetti algorithm for CCL

* Add stat tests for new and old algorithms

* Switch license header to short version
2021-02-27 17:27:24 +00:00
Alexander Alekhin
3eea3dd46b imgproc: add IntelligentScissors 2020-12-25 10:57:11 +00:00
Wenqing Zhang
22d64ae08f
Merge pull request #17570 from HannibalAPE:text_det_recog_demo
[GSoC] High Level API and Samples for Scene Text Detection and Recognition

* APIs and samples for scene text detection and recognition

* update APIs and tutorial for Text Detection and Recognition

* API updates:
(1) put decodeType into struct Voc
(2) optimize the post-processing of DB

* sample update:
(1) add transformation into scene_text_spotting.cpp
(2) modify text_detection.cpp with API update

* update tutorial

* simplify text recognition API
update tutorial

* update impl usage in recognize() and detect()

* dnn: refactoring public API of TextRecognitionModel/TextDetectionModel

* update provided models
update opencv.bib

* dnn: adjust text rectangle angle

* remove points ordering operation in model.cpp

* update gts of DB test in test_model.cpp

* dnn: ensure to keep text rectangle angle

- avoid 90/180 degree turns

* dnn(text): use quadrangle result in TextDetectionModel API

* dnn: update Text Detection API
(1) keep points' order consistent with (bl, tl, tr, br) in unclip
(2) update contourScore with boundingRect
2020-12-03 18:47:40 +00:00
catree
417d7a38de Add Robot-World/Hand-Eye calibration function. 2020-08-27 07:24:07 +02:00
Alexander Alekhin
acc6189da0 Merge pull request #18022 from SoheibKadi:Update_CornerSubPix_Documentation 2020-08-18 13:19:18 +00:00
kadi soheib
613ff61de7 Added reference to paper. 2020-08-03 18:07:36 +03:00
Yosshi999
922108060d
Merge pull request #17907 from Yosshi999:gsoc_asift-py2cpp
* Implement ASIFT in C++

* '>>' should be '> >' within a nested template

* add a sample for asift usage

* bugfix empty keypoints cause crash

* simpler initialization for mask

* suppress the number of lines

* correct tex document

* type casting

* add descriptorsize for asift

* smaller testdata for asift

* more smaller test data

* add OpenCV short license header
2020-08-03 14:11:55 +00:00
Alexander Smorkalov
abceef74e0 Added reference to Original Wu's articte about SAUF connected components search method. 2020-07-22 10:05:55 +03:00
Jan Lebert
a8f04359e8 docs: linkfix in bibliography
The [current link](https://arxiv.org/pdf/1808.01752) goes to a
random unrelated paper.
2020-06-19 11:44:35 +02:00
Alexander Alekhin
a327418767 features2d(sift): move SIFT tests / headers / build fixes 2020-04-23 08:45:22 +00:00
catree
43d58aa760 Improve calib3d documentation:
- add reference to Rodrigues Jacobian
  - add references to SE(3) and Lie Groups topics
  - update some conventions and pinhole figure
2019-12-02 03:04:56 +01:00
catree
33cb9c5ca5 Add SOLVEPNP_IPPE for planar pose estimation. Add solvePnPGeneric function that returns all the pose solutions and the reprojection errors. 2019-05-20 11:56:54 +02:00
catree
dac31e84fb Add solvePnPRefineLM to refine a pose according to a Levenberg-Marquardt iterative minimization process. Add solvePnPRefineVVS to refine a pose using a virtual visual servoing scheme. 2019-04-30 14:31:11 +02:00
catree
bbf39b0964 Add Hand-Eye calibration methods (Tsai, Park, Horaud, Andreff, Daniilidis). 2019-03-05 14:51:33 +01:00
Alexander Alekhin
742f22c09b photo: move TonemapDurand to opencv_contrib 2018-12-04 18:59:27 +03:00
Matthias Winkelmann
24acd5fb83 Merge pull request #13228 from MatthiasWinkelmann:master
Add URLs, harmonise formatting, and fix parse error in bibliography (#13228)

* Fixed parse error in bibliography

* Removed extra curly braces

* harmonized whitespace

* changed organisation -> publisher where appropriate. Organisation is intended as the author's organisation, not the publishing.

* harmonized capitalisation and whitespace

* Add links to about 1/3 of references
2018-11-26 15:04:16 +03:00
Karpushin Vladislav
c5687caf1a doc: add new tutorial anisotropic image segmentation 2018-09-14 13:14:17 +07:00
Karpushin Vladislav
a8e9a3a88d doc: add new tutorial "Out of focus deblur filter"
In this tutorial you will learn:
- what is a degradation image model
- what is a PSF of an out-of-focus image
- how to restore a blurred image
- what is the Wiener filter
2018-07-27 17:12:24 +07:00
catree
ade21f142e Add Java and Python code for the following features2d tutorials: Harris corner detector, Shi-Tomasi corner detector, Creating your own corner detector, Detecting corners location in subpixels, Feature Detection, Feature Description, Feature Matching with FLANN, Features2D + Homography to find a known object. Use Lowe's ratio test to filter the matches. 2018-05-29 10:35:57 +02:00
LaurentBerger
7ad308ea47 Simulated Annealing for ANN_MLP training method (#10213)
* Simulated Annealing for ANN_MLP training method

* EXPECT_LT

* just to test new data

* manage RNG

* Try again

* Just run buildbot with new data

* try to understand

* Test layer

* New data- new test

* Force RNG in backprop

* Use Impl to avoid virtual method

* reset all weights

* try to solve ABI

* retry

* ABI solved?

* till problem with dynamic_cast

* Something is wrong

* Solved?

* disable backprop test

* remove ANN_MLP_ANNEALImpl

* Disable weight in varmap

* Add example for SimulatedAnnealing
2017-12-15 13:57:39 +03:00
catree
b417fb0939 Add tutorial and codes for the homography tutorial. 2017-12-14 15:40:10 +01:00
Jasper Shemilt
0136711cf4 Adds fitEllipseAMS to imgproc: The Approximate Mean Square (AMS) proposed by Taubin 1991.
Adds fitEllipseDirect to imgproc: The Direct least square (Direct) method by Fitzgibbon1999.

New Tests are included for the methods.
fitEllipseAMS Tests
fitEllipseDirect Tests

Comparative examples are added to fitEllipse.cpp in Samples.
2017-10-02 16:38:41 +01: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
Vladislav Sovrasov
dfe4519c07 Add QR decomposition to HAL 2016-09-05 18:20:04 +03:00
catree
5ee61219c8 Add bib reference for overall hitrate and max false alarm rate formulas in train cascade tutorial.
Remove useless backslash.
2016-07-19 10:58:33 +02:00
Marina Noskova
617dd5db5b Fixed doc/opencv.bib 2016-02-10 17:57:36 +03:00
joao.faro
a2f0963d66 SVMSGD class added 2016-02-10 16:53:15 +03:00
Thomas Dunker
6882c10b45 Extension of the camera distortion model for tilted image sensors (Scheimpflug condition) including test 2015-12-14 15:20:34 +01:00
Maksim Shabunin
7392ce0a81 Added some documentation for MSER 2015-11-05 17:17:18 +03:00