Add to mcc detect and infer test #3647
merge with https://github.com/opencv/opencv_extra/pull/1153
Added a full pipeline tests:
1. detector->process(img, (TYPECHART)0, 1, true);
2. ColorCorrectionModel model(src, COLORCHECKER_Macbeth); model.run();
3. calibratedImage = model.infer(calibratedImage)*255.;
### 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
Fixes #25081:Latch input corruption fix#3646
Fixes https://github.com/opencv/opencv/issues/25081
As mentioned by WennPaper making it `grayImage = image.clone();` will make a deep copy. It prevents the `InputArray` from being modified.
- [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
---
Co-authored-by: Dhanwanth1803 <dhanwanthvarala@gmail,com>
Co-authored-by: Dmitry Kurtaev <dmitry.kurtaev@gmail.com>
Move Aruco tutorials and samples to main repo #3401
merge with https://github.com/opencv/opencv/pull/23018
merge with merge with https://github.com/opencv/opencv_extra/pull/1143
### 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
updated readme for several opencv_contrib modules (done by Gary)
Sorry for not putting it through pull requests, but I was citing it in GSoC idea projects and wanted the Google Reviewers to see something visually more compelling.
Fix a bug in knnMatchConvert when a feature couldn't be matched #3632
After I started using a mask with `knnMatchAsync`, I found that the result from `knnMatchConvert` would be clipped at random.
Investigating the issue, I found that `knnMatchAsync` will initialize all `trainIdx` to `-1`, which will be overwritten by the CUDA kernel. A mask can be used to prevent certain features from being matched and this will prevent the CUDA kernel from setting the match distance. `knnMatchConvert` is not properly incrementing the pointers when `trainIdx == -1`, so an unmatched feature will get it stuck at `if (trainIdx == -1)`. Eventually the outer for-loop finishes and returns a vector with the matches up until the first missing match distance.
My solution is to increment the counters the same way as a successful iteration would.
### 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
cudaimgproc: update for CUDA 8.0 and fix out of bounds memory error in cuda::moments #3618
Fix https://github.com/opencv/opencv_contrib/issues/3612 and address out of bounds memory error when not calculating all image moments.
### 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
AscendC is an extended syntax for the C/C++ language that can be used to
write operators that run on Ascend NPU.
This commit introduce an operator(threshold) written in AscendC. Others
can refer to this to implement other operators.
AscendC can implement efficient fusion operators according to needs, in
this case, threshold execution speed increased by nearly 4 times.
Co-authored-by: CaoMengqing <cmq0113@163.com>
CANN (Compute Architecture of Neural Networks), developped by Huawei, is
a heterogeneous computing architecture for AI. Opencv DNN has already
suppoted CANN backend [#22634](https://github.com/opencv/opencv/pull/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 <cmq0113@163.com>
cudacodec::VideoReader: allow frame seek on initialization #3542
Allow seeking of video source on initialization of `cudacodec::VideoReader` when new variable `VideoReaderInitParams::iFirstFrame` != 0.
Dependant on https://github.com/opencv/opencv/pull/24012
Fixes https://github.com/opencv/opencv_contrib/issues/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