1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge pull request #28749 from Prasadayus:NMS-empty-detection-fix

Nms empty detection fix #28749

Requires opencv_extra: https://github.com/opencv/opencv_extra/pull/1330

### 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
This commit is contained in:
Prasad Ayush Kumar
2026-04-02 21:07:23 +05:30
committed by GitHub
parent e59506bbf5
commit 47ac80995f
6 changed files with 51 additions and 1 deletions
+2
View File
@@ -867,6 +867,8 @@ void broadcast(InputArray _src, InputArray _shape, OutputArray _dst) {
// impl
_dst.create(dims_shape, shape.ptr<int>(), src.type());
Mat dst = _dst.getMat();
if (dst.total() == 0)
return;
std::vector<int> is_same_shape(dims_shape, 0);
for (int i = 0; i < static_cast<int>(shape_src.size()); ++i) {
if (shape_src[i] == ptr_shape[i]) {