Commit Graph

35131 Commits

Author SHA1 Message Date
Gursimar Singh
979428d590
Merge pull request #26334 from gursimarsingh:dnn_engine_change
Modify DNN Samples to use ENGINE_CLASSIC for Non-Default Back-end or Target #26334

PR resolves #26325 regarding fall-back to ENGINE_CLASSIC if non-default back-end or target is passed by user.
### 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
2024-11-08 08:58:35 +03:00
Gursimar Singh
1ae304bb83
Merge pull request #26347 from gursimarsingh:updated_dnn_samples
Updated segmentation sample as per current update usage and engine #26347

This PR updates segmentation sample as per new usage, and change their DNN engines. It adds usage of findModel, dynamic fontsize, etc. in segmentation sample.

The PR makes the sample consistent with other dnn samples

### 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
2024-11-08 08:55:46 +03:00
Dmitry Kurtaev
a7bb17b092
Merge pull request #26399 from dkurt:dk/file_storage_new_data
int64 data type in FileStorage #26399

### Pull Request Readiness Checklist

resolves #23333

Proposed approach is not perfect in terms of complexity and potential bugs. Instead of changing `INT` raw size from `4` to `8`, we check int64 value can be fitted to int32 or not.

Collections such as cv::Mat rely on data type symbol.

This PR is addressed to 5.x branch first to cover `CV_64S` Mat. Later, it can be backported to 4.x

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
2024-11-08 08:27:59 +03:00
Kumataro
3fac9a9d69
Merge pull request #26412 from Kumataro:fix26411
doc: update to doxygen-awesome-css v2.3.4 #26412

Close https://github.com/opencv/opencv/issues/26411

### 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
2024-11-06 09:50:45 +03:00
Alexander Smorkalov
03983549fc Merge branch 4.x 2024-11-06 08:20:12 +03:00
Dmitry Kurtaev
286f7524bb
Merge pull request #26420 from dkurt:fs_mat_0d_1d
Support 0d/1d Mat in FileStorage #26420

### 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
2024-11-06 08:11:59 +03:00
Alexander Smorkalov
ef0d83643d
Merge pull request #26418 from mshabunin:cleanup-waitkey-5
highgui: drop legacy waitkey behavior
2024-11-05 21:27:30 +03:00
Maksim Shabunin
25b67bc99e highgui: drop legacy waitkey behavior 2024-11-05 15:01:53 +03:00
Alexander Smorkalov
55105719dd
Merge pull request #26396 from hanliutong:rvv-fp16-m2
Use LMUL=2 in the RISC-V Vector (RVV) FP16 part. (5.x)
2024-11-02 13:30:31 +03:00
Alexander Smorkalov
c3747a6847
Merge pull request #26402 from asmorkalov:as/win_uwp_ci
Added Universal Windows Package build to CI.
2024-11-02 13:05:05 +03:00
Alexander Smorkalov
9b635da563 Added Universal Windows Package build to CI. 2024-11-02 12:20:13 +03:00
Vadim Pisarevsky
853fa9dd40
Merge pull request #26400 from vpisarev:fix_fp16_cmp
Fixed FP16 mat comparison in tests #26400

make sure that if both compared FP16/BF16 values are bitwise-equal, assume their difference to be 0 (zero), just like in the case of FP32 and FP64, don't try to compare them as floating-point numbers, because they can be NaN's.

**fixes** #24894

- [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
2024-11-02 12:07:48 +03:00
Alexander Smorkalov
7a5f12c630
Merge pull request #26397 from FantasqueX:remove-useless-cmake-policy
Remove useless cmake policy after upgrading cmake_minimum_required
2024-11-02 10:02:39 +03:00
Vadim Pisarevsky
df06d2eac2
Merge pull request #26254 from vpisarev:extra_tests_for_reshape
Added extra tests for reshape #26254

Attempt to reproduce problems described in #25174. No success; everything works as expected. Probably, the function has been used improperly. Slightly modified the code of Mat::reshape() to provide better diagnostic.

- [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
2024-11-01 11:37:56 +03:00
Alexander Smorkalov
ee95bfe244
Merge pull request #26203 from FantasqueX:generic-simd-warpAffineBlocklineNN
Use generic SIMD in warpAffineBlocklineNN
2024-11-01 11:16:51 +03:00
Letu Ren
65a606966b Remove useless cmake policy after upgrading cmake_minimum_required 2024-11-01 16:16:37 +08:00
Liutong HAN
a59a66a2c7 Use LMUL=2 in the RISC-V Vector (RVV) FP16 part. 2024-11-01 07:05:25 +00:00
Alexander Smorkalov
ddc03c0769
Merge pull request #26390 from asmorkalov:as/kleidicv_no_sme2
Disable SME2 branches in KleidiCV as it's incompatible with some CLang versions, e.g. NDK 28b1
2024-10-31 14:09:24 +03:00
Alexander Smorkalov
a95658f106
Merge pull request #26383 from mshabunin:fix-samples-cpp-17
build: raise min cmake version to 3.13 in other places
2024-10-31 09:34:28 +03:00
Alexander Smorkalov
cf87380fad Disable SME2 branches in KleidiCV as it's incompatible with some CLang versions, e.g. NDK 28b1. 2024-10-31 08:14:30 +03:00
Alexander Smorkalov
725ce48837
Merge pull request #26388 from vrabaud:4_8u
Fix test typo.
2024-10-31 07:58:24 +03:00
Vincent Rabaud
265a2c39b2 Fix test typo. 2024-10-30 15:05:30 +01:00
Alexander Smorkalov
2756c20e3e
Merge pull request #26384 from mshabunin:fix-winrt-warnings-2
WinRT/UWP build: fix more warnings in media part
2024-10-30 16:04:32 +03:00
Alexander Smorkalov
6a8300c1a0
Merge pull request #26385 from vpisarev:fix_bfloat_test
fixed typo in bfloat<=>float conversion test
2024-10-30 16:01:46 +03:00
Maksim Shabunin
e44e3ab0a7 build: raise min cmake version to 3.13 in other places 2024-10-30 14:39:04 +03:00
Vadim Pisarevsky
299aa14c4b fixed typo in bfloat<=>float conversion test 2024-10-29 20:06:11 +03:00
Maksim Shabunin
7654d06b83 WinRT/UWP build: fix more warnings in media part 2024-10-29 19:19:09 +03:00
Alexander Smorkalov
41489f983d
Merge pull request #26381 from dkurt:dk/hotfix_dnn_debug
Hotfix ie_ngraph.cpp in Debug
2024-10-29 12:33:08 +03:00
Dmitry Kurtaev
0e80a97f87
Hotfix ie_ngraph.cpp in Debug 2024-10-29 10:20:51 +03:00
Oちゃん
8791cd147c
Merge pull request #26374 from OrkWard:fix-js-build-script
Fix incorrect string format in js build script #26374

I accidentally met this small problem mentioned in https://github.com/opencv/opencv/pull/25084#discussion_r1710838120 when play with wasm build. It seems https://github.com/EDVTAZ didn't fix it yet, so I create this tiny pr.

Additionally, I remove a redundant argument in `add_argument` call. `'store_true'` already set the default, see https://docs.python.org/3/library/argparse.html#action.

### 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
2024-10-28 17:07:15 +03:00
WU Jia
66a29b422c
Merge pull request #25708 from kaingwade:flann2annoy
Add interface to Annoy which will replace the FLANN #25708

This PR is to add interface to [Annoy](https://github.com/spotify/annoy) which will replace the FLANN, part of one of the cleanup work of OpenCV 5.0: #24998. 

After it, there will be consecutive patches:

- [ ] Add Annoy based DescriptorMatcher
- [ ] Replace FLANN based code with Annoy and remove FLANN completely

### 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
- [ ] 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
2024-10-28 17:04:02 +03:00
alexlyulkov
a2fa1d49a4
Merge pull request #26208 from alexlyulkov:al/new-engine-caffe-parser
Modified Caffe parser to support the new dnn engine #26208

Now the Caffe parser supports both the old and the new engine. It can be selected using newEngine argument in PopulateNet.

All cpu Caffe tests work fine except:

- Test_Caffe_nets.Colorization
- Test_Caffe_layers.FasterRCNN_Proposal

Both these tests doesn't work because of the bug in the new net.forward function. The function takes the name of the desired target last layer, but uses this name as the name of the desired output tensor.
Also Colorization test contains a strange model with a Silence layer in the end, so it doesn't have outputs. The old parser just ignored it. I think, the proper solution is to run this model until the (number_of_layers - 2) layer using proper net.forward arguments in the test.

### 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
- [ ] 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
2024-10-28 11:32:07 +03:00
Gursimar Singh
7b0a082dd4
Merge pull request #26326 from gursimarsingh:object_detection_fixed
[BUG FIX] Object detection sample preprocessing #26326

PR resloves #26315 related to incorrect preprocessing for 'Image2BlobParams' in object detection sample.
### 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
2024-10-28 11:25:45 +03:00
Gursimar Singh
f217656916
Merge pull request #25349 from gursimarsingh:videocapture_samples_cpp
combined videocapture and videowriter samples  for cleanup
2024-10-28 09:57:54 +03:00
Gursimar Singh
331d327760
Merge pull request #26336 from gursimarsingh:person_reid_bug_fix
[BUG FIX] Fix issues in Person ReID C++ sample #26336

This PR fixes multiple issues in the Person ReID C++ sample that were causing incorrect outputs. It addresses improper matrix initialization, adds a missing return statement, and ensures that vectors are properly cleared before reuse. These changes correct the output of the sample.
### 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
2024-10-28 09:49:33 +03:00
Kumataro
3b01a4d4e9
Merge pull request #26373 from Kumataro:fix26372
doc: fix doxygen errors at Algorithm and QRCodeEncoder #26373

Close https://github.com/opencv/opencv/issues/26372

### 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
2024-10-28 09:20:04 +03:00
Alexander Smorkalov
8a5ec4bf7b
Merge pull request #26287 from mshabunin:cpp-17
build: transition to C++17, minor changes in documentation
2024-10-26 19:59:48 +03:00
Wanli
29e712ed93
Merge pull request #26369 from WanliZhong:5x_fix_hfloat_vfunc
Fix hfloat conflicts of v_func in merging 4.x to 5.x #26369

This PR solves the conflicts in merging 4.x to 5.x https://github.com/opencv/opencv/pull/26358
1. Explicitly convert the inputs number for `v_setall_` to hfloat number
2. Loosens the threshold for `v_sincos` test. (related issue: https://github.com/opencv/opencv/issues/26362)
3. Remove the new but temp api `template <> inline v_float16x8 v_setall_(float v) { return v_setall_f16((hfloat)v); }`

### 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
- [ ] 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-10-26 19:54:13 +03:00
Alexander Smorkalov
dd08328228
Merge pull request #26368 from hanliutong:rvv-hal-license
Add the missing license header in hal_rvv.
2024-10-26 09:36:07 +03:00
Alexander Smorkalov
24a497acd8
Merge pull request #26370 from mshabunin:fix-winrt-warnings
WinRT/UWP build: fix some specific warnings
2024-10-26 09:34:00 +03:00
Maksim Shabunin
52100328d8 WinRT/UWP build: fix some specific warnings 2024-10-25 22:32:44 +03:00
Alexander Smorkalov
05e7988e9c
Merge pull request #26367 from alexlyulkovЖal/forward-to-layer-assert
Added exception when calling forward to specified layer with the new dnn engine
2024-10-25 15:22:09 +03:00
Maksim Shabunin
d223e796f5 build: transition to C++17, minor changes in documentation 2024-10-25 15:05:14 +03:00
Liutong HAN
515b4a2689 Add the missing license description. 2024-10-25 11:37:07 +00:00
Alexander Lyulkov
3a4c88c33e Added exception when calling forward to specified layer with the new dnn engine 2024-10-25 13:00:15 +03:00
Alexander Smorkalov
8e55659afe Merge branch 4.x 2024-10-24 15:10:43 +03:00
Alexander Smorkalov
e4bcd46f64
Merge pull request #26356 from hardikkamboj:4.x
Update py_thresholding.markdown
2024-10-24 12:39:43 +03:00
Liutong HAN
35571be570
Merge pull request #26318 from hanliutong:rvv-intrin-m2
Use LMUL=2 in the RISC-V Vector (RVV) backend of Universal Intrinsic. #26318

The modification of this patch involves the RVV backend of Universal Intrinsic, replacing `LMUL=1` with `LMUL=2`.

Now each Universal Intrinsic type actually corresponds to two RVV vector registers, and each Intrinsic function also operates two vector registers. Considering that algorithms written using Universal Intrinsic usually do not use the maximum number of registers, this can help the RVV backend utilize more register resources without modifying the algorithm implementation

This patch is generally beneficial in performance.

We compiled OpenCV with `Clang-19.1.1` and `GCC-14.2.0` , ran it on `CanMV-k230` and `Banana-Pi F3`. Then we have four scenarios on combinations of compilers and devices. In `opencv_perf_core`, there are 3363 cases, of which:
- 901 (26.8%) cases achieved more than `5%` performance improvement in all four scenarios, and the average speedup of these test cases (compared to scalar) increased from `3.35x` to `4.35x`
- 75 (2.2%) cases had more than `5%` performance loss in all four scenarios, indicating that these cases are better with `LMUL=1` instead of `LMUL=2`. This involves `Mat_Transform`, `hasNonZero`, `KMeans`, `meanStdDev`, `merge` and `norm2`. Among them, `Mat_Transform` only has performance degradation in a few cases (`8UC3`), and the actual execution time of `hasNonZero` is so short that it can be ignored. For `KMeans`, `meanStdDev`, `merge` and `norm2`, we should be able to use the HAL to optimize/restore their performance. (In fact, we have already done this for `merge`  #26216 )

### 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
- [ ] 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-10-24 10:08:43 +03:00
Alexander Smorkalov
331412dfad
Merge pull request #26357 from dkurt:dkurt/ov_out_names_from_graph
OpenVINO friendly output names from non-compiled Model
2024-10-23 13:42:01 +03:00
Dmitry Kurtaev
d193554a5f OpenVINO friendly output names from non-compiled Model 2024-10-23 09:29:05 +03:00