Commit Graph

134 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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 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
762481411d Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-10-15 16:44:47 +00:00
AleksandrPanov
d43cb4fe7c change resize flag INTER_LINEAR to INTER_LINEAR_EXACT
fix python test_detect_and_decode_multi, sort QR in multiDetect/multiDecode
enable tests with "version_5_up.jpg", "version_5_top.jpg"
2022-09-28 23:52:24 +03:00
Alexander Smorkalov
2273af0166
Merge pull request #22286 from asenyaev:asen/disabled_compiling_warnings_4.x
Disabled compiling warnings in case of symbols in cmake for 4.x
2022-09-20 15:13:06 +03:00
Andrey Senyaev
ccfc34b13f Disabled compiling warnings in case of symbols in cmake for 4.x 2022-09-20 13:35:48 +03:00
AleksandrPanov
2dd3408caa change resize interpolation to enable tests in arm, disable close_5 2022-08-25 14:27:18 +03:00
AleksandrPanov
7ffb103758 QRcode, change INTER_LINEAR to INTER_LINEAR_EXACT
fix python test_detect_and_decode_multi

fix python test_detect_and_decode_multi, sort QR in multiDetect/multiDecode

enable tests with "version_5_up.jpg", "version_5_top.jpg"

remove lambda
2022-08-16 10:24:54 +03:00
Alexander Alekhin
2ebdc04787 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-08-14 15:50:42 +00:00
Rong Mantle Bao
3135063100
Make objdetect/test C++11-compliant and reproducible
- Add conditional compilation directives to replace deprecated std::random_shuffle with new std::shuffle when C++11 is available.

- Set random seed to a fixed value before shuffling containers to ensure reproducibility.

Resolves opencv/opencv#22209.
2022-07-12 20:18:54 +08:00
Alexander Alekhin
583bd1a6e2 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-06-04 19:10:35 +00:00
Alexander Panov
53eda42da7
Merge pull request #22025 from AleksandrPanov:fix_samplingForVersion_multiplyingFactor
Fix sampling for version multiplying factor

* reduce experimentalFrequencyElem and listFrequencyElem

* fix large resize

* fix tile in postIntermediate

* add getMinSideLen(), add corrected_index

* add test decode_regression_21929 author Kumataro, add test decode_regression_version_25
2022-06-04 17:33:08 +03:00
Kumataro
1a24e316d5
Merge pull request #22030 from Kumataro:3.4-fix22029
* objdetect: qrcode_encoder: fix to missing timing pattern

* objdetect: qrcode_encoder: Add SCOPED_TRACE() and replace CV_Assert() to ASSERT_EQ().

- Add SCOPED_TRACE() for version loop.

- Replace CV_Assert() to ASSERT_EQ().

- Rename expect_msg to msg.
2022-05-31 13:58:17 +03:00
Yuantao Feng
f77c3574af
Merge pull request #21607 from fengyuentau:fix_FaceDetectorYN_dynamic_shape
Use YuNet of fixed input shape to fix not-supported-dynamic-zero-shape for FaceDetectorYN

* use yunet with input of fixed shape

* update yunet used in face recognition regression
2022-02-21 13:49:07 +00:00
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
ac4b592b4e Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-20 05:13:50 +00:00
Qiushi Zheng
3e51448ef0
Merge pull request #17889 from ZhengQiushi:my_3.4
QR code (encoding process)

* add qrcode encoder

* qr encoder fixes

* qr encoder: fix api and realization

* fixed qr encoder, added eci and kanji modes

* trigger CI

* qr encoder constructor fixes

Co-authored-by: APrigarina <ann73617@gmail.com>
2021-11-15 17:15:39 +00:00
Alexander Alekhin
7842181b47 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-05 09:27:46 +00:00
APrigarina
8e72e1ed88 add test case for QR detect fix 2021-11-03 19:56:54 +00:00
Yuantao Feng
34d359fe03
Merge pull request #20422 from fengyuentau:dnn_face
Add DNN-based face detection and face recognition into modules/objdetect

* Add DNN-based face detector impl and interface

* Add a sample for DNN-based face detector

* add recog

* add notes

* move samples from samples/cpp to samples/dnn

* add documentation for dnn_face

* add set/get methods for input size, nms & score threshold and topk

* remove the DNN prefix from the face detector and face recognizer

* remove default values in the constructor of impl

* regenerate priors after setting input size

* two filenames for readnet

* Update face.hpp

* Update face_recognize.cpp

* Update face_match.cpp

* Update face.hpp

* Update face_recognize.cpp

* Update face_match.cpp

* Update face_recognize.cpp

* Update dnn_face.markdown

* Update dnn_face.markdown

* Update face.hpp

* Update dnn_face.markdown

* add regression test for face detection

* remove underscore prefix; fix warnings

* add reference & acknowledgement for face detection

* Update dnn_face.markdown

* Update dnn_face.markdown

* Update ts.hpp

* Update test_face.cpp

* Update face_match.cpp

* fix a compile error for python interface; add python examples for face detection and recognition

* Major changes for Vadim's comments:

* Replace class name FaceDetector with FaceDetectorYN in related failes

* Declare local mat before loop in modules/objdetect/src/face_detect.cpp

* Make input image and save flag optional in samples/dnn/face_detect(.cpp, .py)

* Add camera support in samples/dnn/face_detect(.cpp, .py)

* correct file paths for regression test

* fix convertion warnings; remove extra spaces

* update face_recog

* Update dnn_face.markdown

* Fix warnings and errors for the default CI reports:

* Remove trailing white spaces and extra new lines.

* Fix convertion warnings for windows and iOS.

* Add braces around initialization of subobjects.

* Fix warnings and errors for the default CI systems:

* Add prefix 'FR_' for each value name in enum DisType to solve the
redefinition error for iOS compilation; Modify other code accordingly

* Add bookmark '#tutorial_dnn_face' to solve warnings from doxygen

* Correct documentations to solve warnings from doxygen

* update FaceRecognizerSF

* Fix the error for CI to find ONNX models correctly

* add suffix f to float assignments

* add backend & target options for initializing face recognizer

* add checkeq for checking input size and preset size

* update test and threshold

* changes in response to alalek's comments:

* fix typos in samples/dnn/face_match.py

* import numpy before importing cv2

* add documentation to .setInputSize()

* remove extra include in face_recognize.cpp

* fix some bugs

* Update dnn_face.markdown

* update thresholds; remove useless code

* add time suffix to YuNet filename in test

* objdetect: update test code
2021-10-08 19:13:49 +00:00
Alexander Alekhin
3e513ee6ab Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-06-03 16:23:36 +00:00
Smirnov Egor
84f78059d3 add reproducer and bugfix 2021-05-25 11:28:23 +03:00
Alexander Alekhin
6b474c4051 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-02-06 00:44:11 +00:00
Polina Smolnikova
0be18f5cb0
Merge pull request #19407 from rayonnant14:issue_19363
QRCodeDetector::decodeMulti() fixed invalid usage fixedType()

* fixed invalid usage fixedType()
changed default barcode type to CV_8UC1
added tests
added assert in case multi channel straight barcode input

* deleted extra wrap into OutputArray

* fix warnings

* objdetect(qr): remove unnecessary checks

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-02-05 21:24:27 +00:00
Alexander Alekhin
f345ed564a Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-10-26 20:07:47 +00:00
ann
c71f2714c6
Merge pull request #18003 from APrigarina:curved_qrcodes_decoding
Detection and decoding of curved QR-codes

* temp changes for curved qrcodes

* added api for curved qr code decoding

* fixed prototypes

* refactored curved qr code decoding

* refactored curved qr code decoding 2nd part

* refactored curved qr code decoding 3rd part

* refactored curved qr code decoding 4th part

* added tests for curved qr code decoding

* refactored curved qr code decoding 5th part
2020-10-23 18:42:45 +00:00
Alexander Alekhin
bfcc136dc7 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-04-21 21:32:51 +00:00
Polina Smolnikova
40973bea31
Merge pull request #16961 from rayonnant14:objdetect_different_return_value_issue
QRDetectMulti : different return value bug fix

* QRDetectMulti : bug fix

* added tests

* changed test image due to large size of previous test image
2020-04-21 20:44:50 +00:00
Alexander Alekhin
2cef100303 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-04-16 18:28:27 +00:00
Tomoaki Teshima
96075ce0c9 avoid test failure on Arm platform 2020-04-17 00:59:15 +09:00
Alexander Alekhin
ca23c0e630 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-03-17 13:23:33 +03:00