Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.x merge 4.x #3621

Merged
merged 19 commits into from
Jan 22, 2024
Merged

5.x merge 4.x #3621

merged 19 commits into from
Jan 22, 2024

Conversation

asmorkalov
Copy link
Contributor

The PR includes all changes in 4.x till 4.9.0 release.

Main OpenCV PR: opencv/opencv#24862
OpenCV Extra PR: opencv/opencv_extra#1142

#3400 from cudawarped:add_cuda_first_class_support
#3516 from cudawarped:cuda_moments
#3542 from cudawarped:cudacodec_videoreader_seek
#3552 from hipudding:npu_support
#3593 from Kumataro:refix_freetype_loadFontData
#3594 from asmorkalov:as/matchLOGOS_bindining_fix
#3595 from cudawarped:fix_FarnebackOpticalFlow_stream_sync
#3598 from asmorkalov:as/cuda_stereo_init_fix
#3611 from asmorkalov:as/disable_cuda_surf
#3613 from amishutin:signal_module
#3615 from cudawarped:cudacodec_enable_win32_for_updated_dll
#3616 from vrabaud:4.x
#3618 from cudawarped:cudaimgproc_moments_fix
#3620 from opencv-pushbot:gitee/alalek/signal_hotfix

Previous "Merge 4.x": #3587

razaqq and others added 18 commits October 30, 2023 17:24
…seek

cudacodec::VideoReader: allow frame seek on initialization opencv#3542

Allow seeking of video source on initialization of `cudacodec::VideoReader` when new variable `VideoReaderInitParams::iFirstFrame` != 0.

Dependant on opencv/opencv#24012

Fixes opencv#3541.

### 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
freetype: Add function to load font from buffer(additional patch)
CANN (Compute Architecture of Neural Networks), developped by Huawei, is
a heterogeneous computing architecture for AI. Opencv DNN has already
suppoted CANN backend [#22634](opencv/opencv#22634).

There are more and more users using [Ascend NPU](https://www.hiascend.com/)
and programming with CANN, and the number is still growing rapidly.
AI training and inference are inseparable from data preprocessing.
When users use OpenCV to work with CANN backend, data preprocessing can
only run on CPUs, resulting in inefficiency.

The purpose of this commit is to enable OpenCV operators on CANN backend.

The usage of CANN backend is consistent, Please refer to OpenCV DNN: [CANN backend manual]
(https://gist.github.com/fengyuentau/083f7f339592545c1f1d2c1fde6a53dc#file-a_ocv_cann-md):
1. [Install dependencies]
   (https://gist.github.com/fengyuentau/083f7f339592545c1f1d2c1fde6a53dc#install-dependencies)
2. [Install CANN]
   (https://gist.github.com/fengyuentau/083f7f339592545c1f1d2c1fde6a53dc#install-cann)
3. [Compile OpenCV with CANN]
   (https://gist.github.com/fengyuentau/083f7f339592545c1f1d2c1fde6a53dc#build-opencv-with-cann)

The CANN backend is used in a similar way to CUDA:
| Object    | CANN         | CUDA     |
| --------- | ------------ | -------- |
| Namespace | cv::cann     | cv::cuda |
| Matrix    | AscendMat    | GpuMat   |
| Stream    | AscendStream | Stream   |
| Event     | AscendEvent  | Event    |

The current commit provides CANN backend operator support framework, In
order to make code viewing easy, only a few basic interfaces are
implemented, all of the following operators are tested and compared
result with CPU backend.

More operators will continue implement in new independent commits.

Co-authored-by: CaoMengqing <[email protected]>
…ow_stream_sync

`cudaoptflow`: fix `FarnebackOpticalFlow` internal stream synchronization when used with an external CUDA stream
…g_fix

Binding fix for matchLOGOS with python test.
…upport

`cuda`: CMake add CUDA first class language support
@asmorkalov asmorkalov changed the base branch from 4.x to 5.x January 18, 2024 14:49
@asmorkalov asmorkalov merged commit 4b7de5a into opencv:5.x Jan 22, 2024
7 of 9 checks passed
@asmorkalov asmorkalov mentioned this pull request Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants