Commit Graph

835 Commits

Author SHA1 Message Date
Alexander Smorkalov
c497fe05a0 Removed invalid reference usage in charuco detector. 2023-10-03 11:31:48 +03:00
Alexander Smorkalov
224dac9427
Merge pull request #24126 from AleksandrPanov:fix_charuco_checkBoard
fix charuco checkBoard
2023-09-20 14:38:14 +03:00
Alex
60ae973142 fix charuco checkBoard 2023-09-20 12:27:07 +03:00
Yuriy Chernyshov
638c575c73 More fixes for iterators-are-pointers case 2023-09-15 12:37:43 +03:00
Alex
ae1d1b6d55 fix drawDetectedCornersCharuco, drawDetectedMarkers, drawDetectedDiamonds added tests 2023-09-12 12:17:57 +03:00
Alexander Smorkalov
757d296382
Merge pull request #24228 from AleksandrPanov:fix_extendDictionary
fix extendDictionary
2023-09-08 11:01:43 +03:00
Alex
e5ff41ec9b fixes extendDictionary, add test 2023-09-07 16:01:51 +03:00
Yuriy Chernyshov
8a415c881a Add missing std namespace qualifiers 2023-09-06 13:46:39 +03:00
Alexander Smorkalov
c9d70d46b1
Merge pull request #24139 from AleksandrPanov:fix_refineDetectedMarkers
fix refineDetectedMarkers
2023-09-05 15:24:57 +03:00
Dmitry Kurtaev
6ae7caaa01
Merge pull request #24216 from dkurt:inter_lines_less_compute
Minor optimization of two lines intersection #24216

### Pull Request Readiness Checklist

Not significant, but we can reduce number of multiplications while compute two lines intersection. Both methods are used heavily in their modules.

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
- [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-09-05 10:44:56 +03:00
Alex
ca527040e2 fix refineDetectedMarkers, add test 2023-09-04 18:28:28 +03:00
Vincent Rabaud
8a1b998b2b
Merge pull request #24194 from vrabaud:compilation_fix
* Fix compilation when forcing later C++.

* Remove random_shuffle.

* Remove random_shuffle.
2023-08-27 17:46:24 +00:00
Alex
c12e1ecb86 update aruco bytesList docs 2023-07-13 13:50:07 +03:00
Vincent Rabaud
e9414169a3 Fix compilation when HAVE_QUIRC is not set.
One variable is unknown while the other one is unused.
Fixed build warnings.
2023-07-03 11:35:05 +03:00
Alexander Panov
e7501b69ea
Merge pull request #23647 from AleksandrPanov:fix_charuco_board_detect
Add charuco board check #23647

Added charuco board checking to avoid detection of incorrect board.
Fixes #23517

### 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
2023-06-23 16:16:22 +03:00
Alexander Panov
affc69bf1f
Merge pull request #23848 from AleksandrPanov:fix_detectDiamonds_api
Fix detect diamonds api #23848

`detectDiamonds` cannot be called from python, reproducer:

```
import numpy as np
import cv2 as cv

detector = cv.aruco.CharucoDetector(
    cv.aruco.CharucoBoard(
        (3, 3), 200.0, 100.0,
        cv.aruco.getPredefinedDictionary(cv.aruco.DICT_4X4_250)
    )
)
image = np.zeros((640, 480, 1), dtype=np.uint8)
res = detector.detectDiamonds(image)
print(res)
```

The error in `detectDiamonds` API fixed by replacing `InputOutputArrayOfArrays markerIds` with `InputOutputArray markerIds`.


### 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.
- [ ] The feature is well documented and sample code can be built with the project CMake
2023-06-22 17:30:44 +03:00
Alexander Smorkalov
b6d1402361 Fixed barcode to be built without DNN 2023-06-16 15:12:49 +03:00
Maksim Shabunin
2b3424b536 objdetect: updated barcode test 2023-06-15 15:32:19 +03:00
Maksim Shabunin
463cd09811
Merge pull request #23666 from mshabunin:barcode-move
Moved barcode from opencv_contrib #23666

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

##### TODO
- [x] Documentation (bib)
- [x] Tutorial (references)
- [x] Sample app (refactored)
- [x] Java (test passes)
- [x] Python (test passes)
- [x] Build without DNN
2023-06-14 22:21:38 +03:00
Damiano Falcioni
19f4f2eb92
Merge pull request #23785 from damianofalcioni:4.x
added Aruco MIP dictionaries #23785

added Aruco MIP dictionaries: DICT_ARUCO_MIP_16h3, DICT_ARUCO_MIP_25h7, DICT_ARUCO_MIP_36h12 from [Aruco.js](https://github.com/damianofalcioni/js-aruco2), converted in opencv format using https://github.com/damianofalcioni/js-aruco2/blob/master/src/dictionaries/utils/dic2opencv.js

### 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
2023-06-14 13:29:30 +03:00
zihaomu
37459f89c9 remove unsupported unsupported unicode 2023-06-11 23:02:34 +08:00
Alex
b729d8e821 added graphicalCodeDetector, remove QRCodeDetectorBase 2023-06-08 14:50:58 +03:00
Alex
b5ac7ef2f2 fix cornerRefinementMethod binding 2023-06-05 11:04:11 +03:00
Alexander Panov
9fa014edcd
Merge pull request #23264 from AleksandrPanov:add_detect_qr_with_aruco
Add detect qr with aruco #23264

Using Aruco to detect finder patterns to search QR codes.

TODO (in next PR):
- add single QR detect (update `detect()` and `detectAndDecode()`)
- need reduce full enumeration of finder patterns
- need add finder pattern info to `decode` step
- need to merge the pipeline of the old and new algorithm

[Current results:](https://docs.google.com/spreadsheets/d/1ufKyR-Zs-IGXwvqPgftssmTlceVjiQX364sbrjr2QU8/edit#gid=1192415584)
+20% total detect, +8% total decode in OpenCV [QR benchmark](https://github.com/opencv/opencv_benchmarks/tree/develop/python_benchmarks/qr_codes) 

![res1](https://user-images.githubusercontent.com/22337800/231228556-191d3eae-a318-44e1-af99-e7d420bf6248.png)


78.4% detect, 58.7% decode vs 58.5 detect, 50.5% decode in default

[main.py.txt](https://github.com/opencv/opencv/files/10762369/main.py.txt)

![res2](https://user-images.githubusercontent.com/22337800/231229123-ed7f1eda-159a-444b-a3ff-f107d8eb4a20.png)


add new info to [google docs](https://docs.google.com/spreadsheets/d/1ufKyR-Zs-IGXwvqPgftssmTlceVjiQX364sbrjr2QU8/edit?usp=sharing)


### 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
2023-06-02 16:18:24 +03:00
Alexander Smorkalov
d4861bfd1f Merge remote-tracking branch 'origin/3.4' into merge-3.4 2023-05-24 14:37:48 +03:00
Christine Poerschke
d00a96315e
Merge pull request #23612 from cpoerschke:3.4-issue-21532
QRCodeDetector: don't floodFill with outside-of-image seedPoint #23612

Fixes #21532.

### 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
2023-05-22 13:34:30 +03:00
Stefan Becker
e55784a1e8 ChArUco pre460 pattern support 2023-05-04 16:59:04 +03:00
Alex
4ba06c3ed0 fix charuco matchImagePoints 2023-04-27 12:05:09 +03:00
Alexander Smorkalov
3113b49159
Merge pull request #23495 from smeng9:4.x
Fix aruco module CORNER_REFINE_CONTOUR parameter gets skipped
2023-04-20 12:02:43 +03:00
Milan van Wouden
a7c6fedebd
Fix typos in aruco_detector.hpp
"corresponging" -> "corresponding"
"Refind" -> "Refine"
2023-04-18 14:00:21 +02:00
keith siilats
8512deb3cc
Merge pull request #23436 from siilats:patch-2
Fix python bindings for setCharucoParameters #23436

setCharucoParameters fails in python
Fixes: https://github.com/opencv/opencv/issues/23440

### 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-04-17 13:02:27 +03:00
smeng9
a788cc526b
Fix skipped corner refinment branching logic 2023-04-15 20:48:05 +08:00
Yuantao Feng
4f77434da1
Merge pull request #23476 from fengyuentau:add_note_for_yunet
Add notes for the output format of FaceDetectorYN.detect()

Resolves https://github.com/opencv/opencv/pull/23020#issuecomment-1499010015

### 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.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-04-11 12:39:21 +03:00
Alexander Smorkalov
ce01123db2
Merge pull request #23020 from Wwupup:yunetv2
upgrade FaceDetectorYN to v2
2023-04-06 15:47:19 +03:00
Alexander Smorkalov
3cf367c9c4
Merge pull request #23271 from stefan523:aruco_testcase_fixes
Aruco/Charuco test case fixes for floating point for loops
2023-03-30 11:22:14 +03:00
Alex
c643af0b85 fix test 2023-03-29 15:29:56 +03:00
Alex
02bdc10062 fix assert, add test 2023-03-24 11:52:05 +03:00
Wwupup
da3a4dcbc1 upgrade FaceDetectorYN to v2 2023-03-21 12:41:02 +08:00
Genci Berisha
a1b4aa5e88
Added QR_Code data flip support, flip and retry after first EEC failure
Added regression test for the flipped images
2023-03-20 14:26:11 +01:00
Stefan Becker
39e2ebbde4 Aruco/Charuco test case fixes for floating point for loops 2023-02-17 16:45:18 +01:00
keith siilats
b0aace31ec
Update charuco_detector.cpp
Delete the debug print statements accidentally left in
2023-02-05 19:39:25 -05:00
Genci Berisha
743d4ecf7b generateQR() method data loss fix
Added regression parameterized test for Structure Append mode

final_qr_code clear outside generateQR() method
2023-01-26 23:30:14 +01:00
Alexander Alekhin
18cbfa4a4f Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2023-01-23 00:11:12 +00:00
Christoph Rackwitz
a64b51dd94
Merge pull request #23108 from crackwitz:issue-23107
Usage of imread(): magic number 0, unchecked result

* docs: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread()

* samples, apps: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread()

* tests: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread()

* doc/py_tutorials: check imread() result
2023-01-09 09:55:31 +00:00
Alexander Panov
121034876d
Merge pull request #22986 from AleksandrPanov:move_contrib_charuco_to_main_objdetect
merge with https://github.com/opencv/opencv_contrib/pull/3394

move Charuco API from contrib to main repo:

- add CharucoDetector:
```
CharucoDetector::detectBoard(InputArray image, InputOutputArrayOfArrays markerCorners, InputOutputArray markerIds, 
                             OutputArray charucoCorners, OutputArray charucoIds) const // detect charucoCorners and/or markerCorners
CharucoDetector::detectDiamonds(InputArray image, InputOutputArrayOfArrays _markerCorners,
                                InputOutputArrayOfArrays _markerIds, OutputArrayOfArrays _diamondCorners,
                                OutputArray _diamondIds) const
```

- add `matchImagePoints()` for `CharucoBoard`
- remove contrib aruco dependencies from interactive-calibration tool
- move almost all aruco tests to objdetect

### 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
2022-12-28 17:28:59 +03:00
Alexander Smorkalov
a32100d9ba Valgrind issues fix in QRCode detector. 2022-12-23 10:50:31 +03:00
Alexander Alekhin
c6a15e1835 aruco(cleanup): don't use Ptr<FileStorage> 2022-12-21 10:52:43 +00:00
Alexander Panov
b4b35cff15
Merge pull request #22368 from AleksandrPanov:move_contrib_aruco_to_main_objdetect
Megre together with https://github.com/opencv/opencv_contrib/pull/3325

1. Move aruco_detector, aruco_board, aruco_dictionary, aruco_utils to objdetect
1.1 add virtual Board::draw(), virtual ~Board()
1.2 move `testCharucoCornersCollinear` to Board classes (and rename to `checkCharucoCornersCollinear`)
1.3 add wrappers to keep the old api working
3. Reduce inludes
4. Fix java tests (add objdetect import)
5. Refactoring

### 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

```
**WIP**
force_builders=linux,win64,docs,Linux x64 Debug,Custom
Xbuild_contrib:Docs=OFF

build_image:Custom=ubuntu:22.04
build_worker:Custom=linux-1
```
2022-12-16 12:28:47 +03:00
AleksandrPanov
a32143003d add alignment detect 2022-12-14 23:56:57 +03:00
Alexander Alekhin
be326ff752 build: fix/eliminate MSVC warnings 2022-12-10 12:19:31 +00:00