Commit Graph

24075 Commits

Author SHA1 Message Date
Alexander Alekhin
bb7c35b99f Merge pull request #24160 from mshabunin:update-ade 2023-08-18 08:02:44 +00:00
Alexander Alekhin
2b87e78e18 Merge pull request #24157 from dkurt:gapi_ov_optional 2023-08-18 08:02:11 +00:00
autoantwort
f5a14532c2
Merge pull request #24167 from autoantwort:missing-include
* add missing include

* Apply CR
2023-08-17 09:34:19 +00:00
Sean McBride
d792ebc5d2 Fixed buffer overrun; removed the last two uses of sprintf
Fixed an off-by-1 buffer resize, the space for the null termination was forgotten.

Prefer snprintf, which can never overflow (if given the right size).

In one case I cheated and used strcpy, because I cannot figure out the buffer size at that point in the code.
2023-08-16 20:04:17 -04:00
Alexander Alekhin
abda763073 Merge pull request #24150 from DeePingXian:4.x 2023-08-16 22:25:11 +00:00
Dmitry Kurtaev
8ad5eb521a
Merge pull request #24120 from dkurt:actualize_dnn_links
OCL_FP16 MatMul with large batch

* Workaround FP16 MatMul with large batch

* Fix OCL reinitialization

* Higher thresholds for INT8 quantization

* Try fix gemm_buffer_NT for half (columns)

* Fix GEMM by rows

* Add batch dimension to InnerProduct layer test

* Fix Test_ONNX_conformance.Layer_Test/test_basic_conv_with_padding

* Batch 16

* Replace all vload4

* Version suffix for MobileNetSSD_deploy Caffe model
2023-08-16 15:46:11 +03:00
Alexander Alekhin
8d1c73a912 Merge pull request #24156 from zihaomu:fix_24041 2023-08-16 12:37:50 +00:00
MuZihao
16681d1080 fix the issue in layer fused 2023-08-16 09:34:59 +08:00
Maksim Shabunin
8e52c0155b gapi: update ADE library to 0.1.2b 2023-08-15 20:49:21 +03:00
Dmitry Kurtaev
ad7ecf1dba Mark OpenVINO models for G-API tests optional 2023-08-15 11:32:44 +03:00
Mihir Patil
fb34f36c69
style: remove extraneous std::cout 2023-08-14 19:11:14 -04:00
Ginkgo
a301d1c298 fix ipp_warpAffine return value error 2023-08-14 20:58:35 +08:00
Alexander Alekhin
27d718b223 Merge pull request #24138 from mshabunin:fix-gst-plugin-camera 2023-08-13 19:47:21 +00:00
DeePingXian
a300e7e945 Adding support for Streamlabs Desktop Virtual Webcam
Streamlabs Desktop has the same issue in https://github.com/opencv/opencv/issues/19746.
This fixes it using https://github.com/opencv/opencv/pull/23460 method.
2023-08-13 16:40:38 +08:00
Alexander Smorkalov
747b7cab6c
Merge pull request #23734 from seanm:unaligned-copy
Fixed invalid cast and unaligned memory access
2023-08-11 15:23:08 +03:00
Alexander Smorkalov
232c67bf76
Merge pull request #24140 from sthibaul:4.x
Fix GNU/Hurd build
2023-08-11 12:32:22 +03:00
Alexander Smorkalov
5b41134ee7
Merge pull request #24012 from cudawarpedЖvideocapture_raw_read
`VideoCapture`: remove decoder initialization when demuxing
2023-08-11 11:28:57 +03:00
HAN Liutong
0dd7769bb1
Merge pull request #23980 from hanliutong:rewrite-core
Rewrite Universal Intrinsic code by using new API: Core module. #23980

The goal of this PR is to match and modify all SIMD code blocks guarded by `CV_SIMD` macro in the `opencv/modules/core` folder and rewrite them by using the new Universal Intrinsic API.

The patch is almost auto-generated by using the [rewriter](https://github.com/hanliutong/rewriter), related PR #23885.

Most of the files have been rewritten, but I marked this PR as draft because, the `CV_SIMD` macro also exists in the following files, and the reasons why they are not rewrited are:

1. ~~code design for fixed-size SIMD (v_int16x8, v_float32x4, etc.), need to manually rewrite.~~ Rewrited
- ./modules/core/src/stat.simd.hpp
- ./modules/core/src/matrix_transform.cpp
- ./modules/core/src/matmul.simd.hpp

2. Vector types are wrapped in other class/struct, that are not supported by the compiler in variable-length backends. Can not be rewrited directly.
- ./modules/core/src/mathfuncs_core.simd.hpp 
```cpp
struct v_atan_f32
{
    explicit v_atan_f32(const float& scale)
    {
...
    }

    v_float32 compute(const v_float32& y, const v_float32& x)
    {
...
    }

...
    v_float32 val90; // sizeless type can not used in a class
    v_float32 val180;
    v_float32 val360;
    v_float32 s;
};
```

3. The API interface does not support/does not match

- ./modules/core/src/norm.cpp 
Use `v_popcount`, ~~waiting for #23966~~ Fixed
- ./modules/core/src/has_non_zero.simd.hpp
Use illegal Universal Intrinsic API: For float type, there is no logical operation `|`. Further discussion needed

```cpp
/** @brief Bitwise OR

Only for integer types. */
template<typename _Tp, int n> CV_INLINE v_reg<_Tp, n> operator|(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b);
template<typename _Tp, int n> CV_INLINE v_reg<_Tp, n>& operator|=(v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b);
```

```cpp
#if CV_SIMD
    typedef v_float32 v_type;
    const v_type v_zero = vx_setzero_f32();
    constexpr const int unrollCount = 8;
    int step = v_type::nlanes * unrollCount;
    int len0 = len & -step;
    const float* srcSimdEnd = src+len0;

    int countSIMD = static_cast<int>((srcSimdEnd-src)/step);
    while(!res && countSIMD--)
    {
        v_type v0 = vx_load(src);
        src += v_type::nlanes;
        v_type v1 = vx_load(src);
        src += v_type::nlanes;
....
        src += v_type::nlanes;
        v0 |= v1; //Illegal ?
....
        //res = v_check_any(((v0 | v4) != v_zero));//beware : (NaN != 0) returns "false" since != is mapped to _CMP_NEQ_OQ and not _CMP_NEQ_UQ
        res = !v_check_all(((v0 | v4) == v_zero));
    }

    v_cleanup();
#endif
```

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] 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
2023-08-11 08:33:33 +03:00
Samuel Thibault
82de5b3a67 Fix GNU/Hurd build
It has the usual Unix filesystem operations.
2023-08-10 22:43:46 +02:00
Alexander Smorkalov
3421b950ce
Merge pull request #24133 from alexlyulkov:al/fixed-msmf-webcam
Fixed bug when MSMF webcamera doesn't start when build with VIDEOIO_PLUGIN_ALL
2023-08-10 11:48:38 +03:00
Maksim Shabunin
53dfd9536a videoio: fix camera opening with GStreamer plugin 2023-08-10 11:39:29 +03:00
Alexander Lyulkov
4a12707103 Fixed bug when MSMF webcamera doesn't start when build with VIDEOIO_PLUGIN_ALL 2023-08-09 18:43:49 +08:00
Alexander Smorkalov
eccfd98b92
Merge pull request #24089 from cudawarped:cuda_gpumat_fix_convertTo_copyTo_bindings
`cuda`: Fix `GpuMat::copyTo` and `GpuMat::converTo` python bindings
2023-08-09 13:25:39 +03:00
Alexander Smorkalov
9b5b2540a4
Merge pull request #24086 from Kumataro:fix24081
videoio: doc: add odd width or height limitation for FFMPEG
2023-08-09 09:31:47 +03:00
Yuantao Feng
ba70ec99b3
Merge pull request #24122 from fengyuentau:remove_tengine
dnn: cleanup of tengine backend #24122

🚀 Cleanup for OpenCV 5.0. Tengine backend is added for convolution layer speedup on ARM CPUs, but it is not maintained and the convolution layer on our default backend has reached similar performance to that of Tengine.

Tengine backend related PRs:
- https://github.com/opencv/opencv/pull/16724
- https://github.com/opencv/opencv/pull/18323

### 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
2023-08-09 09:26:02 +03:00
Mihir Patil
afb406f1de
style: remove trailing whitespace 2023-08-06 20:10:05 -04:00
unknown
87b7ce4415 Solved issue 24044 2023-08-04 21:57:22 +02:00
Laurent Berger
2ff16d4c45
Merge pull request #24101 from LaurentBerger:I24076
Invalid memory access fix for ONNX split layer parser #24076 #24101

### 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 https://github.com/opencv/opencv/issues/24076
- [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
2023-08-04 12:18:49 +03:00
Alexander Smorkalov
5466fd2606
Merge pull request #24104 from cudawarped:cuda_fix_cuda_toolkit_12_2
`cuda`: fix for compatibility with CUDA Toolkit >= 12.2.0
2023-08-04 12:11:15 +03:00
Dmitry Kurtaev
4b8aeb1129
Merge pull request #24039 from dkurt:tflite_test_backends
TFLite models on different backends (tests and improvements) #24039

### Pull Request Readiness Checklist

* MaxUnpooling with OpenVINO
* Fully connected with transposed inputs/weights with OpenVINO
* Enable backends tests for TFLite (related to https://github.com/opencv/opencv/issues/23992#issuecomment-1640691722)
* Increase existing tests thresholds

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
2023-08-04 11:28:51 +03:00
Dmitry Kurtaev
96f23e3da1
Merge pull request #24080 from dkurt:dnn_cuda_layers
Resolve uncovered CUDA dnn layer #24080

### Pull Request Readiness Checklist

* Gelu activation layer on CUDA
* Try to relax GEMM from ONNX

resolves https://github.com/opencv/opencv/issues/24064

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
2023-08-03 09:13:42 +03:00
cudawarped
e4ad7e3778 VideoCapture: remove decoder initialization when CAP_PROP_FORMAT== -1 (rawMode == true) 2023-08-02 16:34:22 +03:00
Dmitry Kurtaev
0245c0cd10
Merge pull request #24072 from dkurt:openvino_cpu_tests
Remove legacy nGraph logic #24072

### Pull Request Readiness Checklist

TODO:
- [x] Test with OpenVINO 2021.4 (tested locally)

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.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-08-02 14:39:11 +03:00
Dmitry Kurtaev
195aad8e6a
Merge pull request #24069 from dkurt:openvino_detection_layer
DetectionOutput layer on OpenVINO without limitations #24069

### Pull Request Readiness Checklist

required for https://github.com/opencv/opencv/pull/23987

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.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-08-02 14:28:47 +03:00
Anatoliy Talamanov
f46f7eff0c
Merge pull request #24059 from TolyaTalamanov:at/add-onnx-cuda-execution-provider
G-API: Support CUDA & TensoRT Execution Providers for ONNXRT Backend #24059

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] 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
2023-08-02 14:13:07 +03:00
Mihir Patil
e1d0f07c90
highgui(cocoa): fix fullscreen behavior 2023-08-02 00:01:37 -04:00
cudawarped
bea0c1b660 cuda: Fix GpuMat::copyTo and GpuMat::converTo python bindings 2023-08-01 15:09:37 +03:00
Maksim Shabunin
9fc83ac544 videoio: fix V4L compilation for older kernels 2023-08-01 14:11:14 +03:00
Maksim Shabunin
e0e537d94e videoio: fixed MSVC warning in test 2023-08-01 14:09:22 +03:00
cudawarped
ab8cb6f8a9 cuda: fix for compatibility with CUDA Toolkit >= 12.2.0 2023-08-01 13:02:42 +03:00
Kumataro
68968eda8d videoio: doc: add odd width or height limitation for FFMPEG 2023-08-01 18:56:20 +09:00
Alexander Smorkalov
0323761ea6
Merge pull request #24035 from vrabaud:calibration
Fix stereoRectify image boundaries.
2023-07-27 19:36:33 +03:00
Vincent Rabaud
15815fb54d Fix stereoRectify image boundaries.
This should hav ebeen fixed with https://github.com/opencv/opencv/issues/23304
2023-07-27 17:47:26 +03:00
Dmitry Kurtaev
677a28fd2a
Merge pull request #24056 from dkurt:eltwise_prelu
PReLU with element-wise scales #24056

### Pull Request Readiness Checklist

resolves https://github.com/opencv/opencv/issues/24051

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
2023-07-27 16:36:40 +03:00
SaltFish-T
ab6bffc6f8
Merge pull request #23936 from SaltFish-T:4.x
Update opencv dnn to support cann version >=6.3 #23936

1.modify the search path of "libopsproto.so" in OpenCVFindCANN.cmake
2.add the search path of "libgraph_base.so" in OpenCVFindCANN.cmake
3.automatic check Ascend socVersion,and test on Ascend310/Ascend310B/Ascend910B well
2023-07-27 14:21:30 +03:00
Vadim Levin
0c5d74ec1a
Merge pull request #24066 from VadimLevin:dev/vlevin/python-typing-register-dnn-layer
Python typing refinement for dnn_registerLayer/dnn_unregisterLayer functions #24066

This patch introduces typings generation for `dnn_registerLayer`/`dnn_unregisterLayer` manually defined in [`cv2/modules/dnn/misc/python/pyopencv_dnn.hpp`](https://github.com/opencv/opencv/blob/4.x/modules/dnn/misc/python/pyopencv_dnn.hpp)

Updates:

- Add `LayerProtocol` to `cv2/dnn/__init__.pyi`:

    ```python
    class LayerProtocol(Protocol):
        def __init__(
            self, params: dict[str, DictValue],
            blobs: typing.Sequence[cv2.typing.MatLike]
        ) -> None: ...

        def getMemoryShapes(
            self, inputs: typing.Sequence[typing.Sequence[int]]
        ) -> typing.Sequence[typing.Sequence[int]]: ...

        def forward(
            self, inputs: typing.Sequence[cv2.typing.MatLike]
        ) -> typing.Sequence[cv2.typing.MatLike]: ...
    ```

- Add `dnn_registerLayer` function to `cv2/__init__.pyi`:

    ```python
    def dnn_registerLayer(layerTypeName: str,
                          layerClass: typing.Type[LayerProtocol]) -> None: ...
    ```

- Add `dnn_unregisterLayer` function to `cv2/__init__.pyi`:

    ```python
    def dnn_unregisterLayer(layerTypeName: str) -> None: ...
    ```
### 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.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-07-27 11:28:00 +03:00
Vadim Levin
e59b8cd905 feat: add typing stub for redirectError
Python interface for `redirectError`:

```python
def redirectError(
    onError: Callable[[int, str, str, str, int], None] | None
) -> None: ...
```
2023-07-26 21:35:37 +03:00
Alexander Smorkalov
91749a284b
Merge pull request #24061 from VadimLevin:dev/vlevin/python-typing-highgui-refinement
feat: add highgui functions to typing stubs
2023-07-26 20:01:45 +03:00
Vincent Rabaud
94de7e5d21
Merge pull request #24042 from vrabaud:circle
Fix harmless ASAN error. #24042

For an empty radius, &v[0] would be accessed (though the called functions would not use it due to v.size() being 0). Also add checks for emptyness and fix the first element checks, in case we get INT_MAX to compare to.

### 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
2023-07-26 20:00:22 +03:00
Vadim Levin
dad72fd47b feat: add highgui functions to typing stubs
Manually add typing stubs for functions defined in `cv2_highgui.hpp`:
- `createTrackbar`

    ```python
     def createTrackbar(trackbarName: str,
                   windowName: str,
                   value: int,
                   count: int,
                   onChange: Callable[[int], None]) -> None: ...
    ```

- `createButton`

    ```python
    def createButton(buttonName: str,
                     onChange: Callable[[tuple[int] | tuple[int, Any]], None],
                     userData: Any | None = ...,
                     buttonType: int = ...,
                     initialButtonState: int = ...) -> None: ...
    ```

- `setMouseCallback`

    ```python
    def setMouseCallback(
        windowName: str,
        onMouse: Callback[[int, int, int, int, Any | None], None],
        param: Any | None = ...
    ) -> None: ...
    ```
2023-07-26 16:34:43 +03:00
Anatoliy Talamanov
a817813b50
Merge pull request #24045 from TolyaTalamanov:at/add-onnx-directml-execution-provider
G-API: Support DirectML Execution Provider for ONNXRT Backend #24045

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] 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
2023-07-26 16:00:20 +03:00
Alexander Smorkalov
a25e809da1
Merge pull request #24046 from VadimLevin:dev/vlevin/add-cuda-gpu-mat-to-big-types
feat: add cuda_GpuMat to big types
2023-07-26 13:18:32 +03:00
Vadim Levin
be29c99d5a feat: add cuda_GpuMat to big types
This patch enables passing GpuMat as an in/out argument in several functions.
2023-07-26 10:16:49 +03:00
Alexander Smorkalov
b22c2505a8 Disable warning C5054 in VS 2022 C++20 2023-07-26 09:23:32 +03:00
Alexander Smorkalov
e5e1a3bfde
Merge pull request #24043 from zixianweei:use-vaddq_f32-on-arm64
fix compilation error on Windows ARM, use vaddq_f32 instead of +=
2023-07-25 11:41:09 +03:00
Alexander Smorkalov
c9a4775d49
Merge pull request #24047 from ivashmak:remove_unused_4.x
Remove unused features in USAC in 4.x
2023-07-23 21:12:28 +03:00
Alexander Smorkalov
12acf5603a
Merge pull request #24001 from legrosbuffle:legrosbuffle-cvround-intrinsic
Use intrinsics for `cvRound` on x86_64 `__GNUC__` (clang/gcc linux) too.
2023-07-23 09:53:18 +03:00
Ivashechkin, Maxim (PG/R - Comp Sci & Elec Eng)
0bcd66d553 remove unused 2023-07-22 10:44:37 +01:00
Alexander Smorkalov
d69c1d8652
Merge pull request #24032 from vrabaud:ubsan
Fix undefined behavior with wrong function pointers called.
2023-07-21 17:16:12 +03:00
Alexander Smorkalov
d4af868528
Merge pull request #24040 from asmorkalov:as/cuda_dnn_eps_fix
Increase eps for Test_Torch_nets.FastNeuralStyle_accuracy to prevent sporadic test failres with CUDA.
2023-07-21 16:46:34 +03:00
Vadim Levin
2fc7d21971
Merge pull request #24029 from VadimLevin:dev/vlevin/python-add-cuda-stream-to-simple-types
feat: add cuda_Stream and cuda_GpuMat to simple types mapping #24029

This patch fixes usage of `cuda::Stream` in function arguments.

Affected modules: `cudacodec`: 
[`using namespace cuda`](9dfe233020/modules/cudacodec/include/opencv2/cudacodec.hpp (L62))  in public `cudacodec.hpp` header can be removed after merge of the patch.

### 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.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-07-21 14:57:32 +03:00
zixgo
ec7689421d fix compilation error on Windows ARM, use vaddq_f32 instead of += 2023-07-21 19:54:43 +08:00
Alexander Smorkalov
d96ff496b4 Increase eps for Test_Torch_nets.FastNeuralStyle_accuracy to prevent sporadic test failres with CUDA. 2023-07-21 13:51:03 +03:00
Vadim Levin
e3cb5f80e7
Merge pull request #24028 from VadimLevin:dev/vlevin/fix-flann-python-bindings
Fix FLANN python bindings #24028

As a side-effect this patch improves reporting errors by FLANN `get_param`.

resolves #21642

### 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
2023-07-21 12:44:56 +03:00
Alexander Smorkalov
09d2f4ea46
Merge pull request #23931 from asmorkalov:as/drawing_overflow
Fixed possible out-of-bound access in circles drawing
2023-07-21 12:28:14 +03:00
Anatoliy Talamanov
5261961a6e
Merge pull request #24024 from TolyaTalamanov:at/add-onnx-openvino-execution-provider
G-API: Support OpenVINO Execution Provider for ONNXRT Backend #24024

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] 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
2023-07-21 12:18:06 +03:00
Clement Courbet
3cce299a78 Use intrinsics for cvRound on x86 and x86_64 __GNUC__ (clang/gcc linux) too.
We've measured a 7x improvement in speed for `cvRound` using the intrinsic.
2023-07-21 10:57:54 +03:00
Dmitry Kurtaev
e41ba90f17
Merge pull request #24004 from dkurt:tflite_new_layers
[TFLite] Pack layer and other fixes for SSD from Keras #24004

### Pull Request Readiness Checklist

resolves https://github.com/opencv/opencv/issues/23992

**Merge with extra**: https://github.com/opencv/opencv_extra/pull/1076

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
2023-07-21 09:13:37 +03:00
Vincent Rabaud
423ab8ddb8 Use void* 2023-07-20 15:53:57 +02:00
Vincent Rabaud
20784d3da2 Fix undefined behavior with wrong function pointers called.
Details here: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58006
runtime error: call to function (unknown) through pointer to incorrect function type 'void (*)(const unsigned char **, const int *, unsigned char **, const int *, int, int)'
2023-07-20 15:32:05 +02:00
Vadim Levin
1794cdc03c
Merge pull request #24023 from VadimLevin:dev/vlevin/python-typing-magic-constants
Python typing magic constants #24023

This patch adds typing stubs generation for `__all__` and `__version__` constants.

Introduced `__all__` is intentionally empty for all generated modules stubs. 

Type hints won't work for star imports

resolves #23950

### 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.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-07-20 09:18:29 +03:00
Alexander Smorkalov
c792233d9c
Merge pull request #24026 from VadimLevin:dev/vlevin/python-numpy-writeable-flag-check
fix: preserve NumPY writeable flag in output arguments
2023-07-19 19:17:30 +03:00
Vadim Levin
4c568e6ed3 fix: preserve NumPY writeable flag in output arguments 2023-07-19 17:22:10 +03:00
Vadim Levin
9519e67ad2
Merge pull request #24022 from VadimLevin:dev/vlevin/python-typing-cuda
Fix python typing stubs generation for CUDA modules #24022

resolves #23946
resolves #23945
resolves opencv/opencv-python#871

### 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.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-07-19 16:51:41 +03:00
Alexander Smorkalov
b0cbd6ef77
Merge pull request #23999 from asmorkalov:as/opencv_logging
Use OpenCV logging instead of std::cerr
2023-07-19 14:46:27 +03:00
Alexander Smorkalov
23f27d8dbe Use OpenCV logging instead of std::cerr. 2023-07-19 10:49:54 +03:00
Alexander Smorkalov
81f07f001e
Merge pull request #24008 from iarspider:patch-1
test_houghlines: Fix C++20 compatibility
2023-07-18 15:37:43 +03:00
iarspider
55906457e6
test_houghlines: Fix C++20 compatibility
C++20 made it invalid to use simple-template-ids for constructors and destructors: https://eel.is/c++draft/diff.cpp17.class#2
GCC 11 and later throw an error on this, with the unhelpful message `expected unqualified-id before ')' token`. This PR fixes the problem.
2023-07-18 09:18:17 +02:00
cudawarped
e00c904585 cuda: add SkipTestException handling 2023-07-17 18:03:40 +03:00
Zihao Mu
1920993525
Merge pull request #23952 from zihaomu:fix_depth_conv_5x5
DNN: optimize the speed of general Depth-wise #23952

Try to solve the issue: https://github.com/opencv/opencv/issues/23941

### 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
2023-07-14 17:34:39 +03:00
Alexander Smorkalov
1f7025f028
Merge pull request #23920 from loongson-zn:4.x
Fix LoongArch Macro Definition
2023-07-14 15:00:41 +03:00
firebladed
7819ec784b
Merge pull request #18498 from firebladed:patch-1
Add V4L2_PIX_FMT_Y16_BE pixel format #18498

Address #18495
relates to #23944

### 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 other license that is incompatible with OpenCV
- [ ] The PR is proposed to proper branch
- [x] There is reference to 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
- [ ] Test using Melexis MLX90640
2023-07-14 11:31:55 +03:00
Alexander Smorkalov
52d9685cb9 Fixed possible out-of-bound access in circles drawing. 2023-07-14 09:21:33 +03:00
Alexander Smorkalov
3aeaa34023
Merge pull request #23914 from AleksandrPanov:update_aruco_byteList_docs
update ArUco Dictionary documentation
2023-07-13 15:48:57 +03:00
Alex
c12e1ecb86 update aruco bytesList docs 2023-07-13 13:50:07 +03:00
Alexander Smorkalov
bd2695f01b
Merge pull request #23966 from hanliutong:popcount
Add missing ”v_popcount“ for RVV and enable tests.
2023-07-13 12:22:46 +03:00
Vincent Rabaud
fdfb875208
Merge pull request #23922 from vrabaud:imgwarp
Fix imgwarp at borders when transparent. #23922

I believe this is a proper fix to #23562

The PR #23754 overwrites data while that should not be the case with transparent data. The original test is failing because points at the border do not get computed because they do not have 4 neighbors to be computed. Still ,we can approximate their computation with whatever neighbors that are available.

### 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
2023-07-12 15:20:01 +03:00
Alexander Smorkalov
85f0074f23
Merge pull request #23973 from mshabunin:riscv-unaligned-access
RISC-V: fix unaligned loads and stores
2023-07-12 14:51:56 +03:00
Alexander Smorkalov
0f17851562
Merge pull request #23972 from Avasam:partially-unknown-mat
Prefer using `TYPE_CHECKING` condition in `cv2.typing` module
2023-07-12 14:51:08 +03:00
Alexander Smorkalov
53af876999
Merge pull request #23969 from asmorkalov:as/python2_test_fix
Fixed tests execution with Python 2.7
2023-07-11 20:53:01 +03:00
Maksim Shabunin
3f0707234f risc-v: fix unaligned loads and stores 2023-07-11 19:23:12 +03:00
Avasam
cd9f85dbda Update usages of ConditionalAliasTypeNode following #23838 to use TYPE_CHECKING 2023-07-11 12:22:27 -04:00
Alexander Smorkalov
99058ee30b
Merge pull request #23956 from VadimLevin:dev/vlevin/recursive-re-export-submodules
fix: recursively re-export nested submodules in typing stubs
2023-07-11 18:45:27 +03:00
Alexander Smorkalov
48c52c8bbb Fixed tests execution with Python 2.7 2023-07-11 18:24:08 +03:00
Alexander Smorkalov
40727c8369
Merge pull request #23970 from mshabunin:fix-v4l-test
videoio: fix v4l2 test on older platforms (centos)
2023-07-11 18:16:28 +03:00
Maksim Shabunin
e3c1405254 videoio: fix v4l2 test on older platforms (centos) 2023-07-11 17:05:32 +03:00
Yusuke Kameda
87f8cdd699
doxygen: Fix ImwriteFlags documentation misalignment 2023-07-11 19:08:58 +09:00
Liutong HAN
a00818047f Add missing ”v_popcount“ for RVV and enable tests. 2023-07-11 16:10:27 +08:00
Alexander Smorkalov
6af4a02941
Merge pull request #23958 from VadimLevin:dev/vlevin/friendly-wrong-npy-type-message
feat: update NumPy type to Mat type fail message
2023-07-11 10:42:41 +03:00
Alexander Smorkalov
6ff5245cf2
Merge pull request #23927 from Avasam:partially-unknown-mat
Fix partially unknown Mat
2023-07-11 10:32:48 +03:00
Vincent Rabaud
2af6775c14
Merge pull request #23943 from vrabaud:avif_tsan
Fix checkSignature not thread safe for AVIF. #23943

A common decoder cannot be shared with checkSignature which is used like a static function (on a static ist of decoders).

### 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
2023-07-11 10:25:53 +03:00
Alexander Smorkalov
bb61cc0dba
Merge pull request #23954 from VadimLevin:dev/vlevin/matrix-type-constants-stubs
feat: add matrix type stubs generation
2023-07-10 18:48:01 +03:00
Vadim Levin
953de60ff0 feat: update NumPy type to Mat type fail message
Output string representation of NumPy array type if it is not
convertible to OpenCV Mat type
2023-07-10 18:09:15 +03:00
Vadim Levin
986e379f28 feat: add matrix type stubs generation
Adds missing typing stubs:

- Matrix depths: `CV_8U`, `CV_8S` and etc.
- Matrix type constants: `CV_8UC1`, `CV_32FC3` and etc.
- Matrix type factory functions: `CV_*(channels) -> int` and `CV_MAKETYPE`
2023-07-10 17:35:27 +03:00
Vadim Levin
a6df336477 fix: recursively re-export nested submodules 2023-07-10 14:39:59 +03:00
Vadim Levin
8097bdc2f4 fix: typing stubs overload presence check 2023-07-10 14:30:44 +03:00
Alexander Smorkalov
fdc0c12b7f
Merge pull request #23944 from mshabunin:test-v4l2
videoio: test for V4L using virtual device
2023-07-10 12:54:43 +03:00
Alexander Smorkalov
05becd56e5
Merge pull request #23938 from mshabunin/fix-warnings-gcc
Fix compiler warnings for GCC 11-12 and Clang 13
2023-07-10 12:41:37 +03:00
Alexander Smorkalov
d2951d6d4c
Merge pull request #23928 from Avasam:Add-missing-properties-to-error-class
Add missing properties to error class
2023-07-10 12:40:06 +03:00
Maksim Shabunin
09944a83d9 build: w/a compiler warnings for GCC 11-12 and Clang 13, reduce build output 2023-07-10 11:27:59 +03:00
Maksim Shabunin
e43bc88fc3 videoio: test for V4L using virtual device 2023-07-07 17:33:33 +03:00
Maksim Shabunin
8931f08362 videoio: fix CAP_IMAGES with non-numbered file 2023-07-06 22:26:53 +03:00
Zhang Na
10294a84fa Fix LoongArch Macro Definition 2023-07-05 17:42:39 +08:00
Avasam
32251c9b04 Add missing properties to error class 2023-07-04 17:57:30 -04:00
Avasam
9f87475129 Fix partially unknown Mat 2023-07-04 16:44:32 -04:00
Berke
71796edf95
removed trailing semicolon after function
It gives error when building projects with -Wpedantic -Werror

error: extra ‘;’ [-Werror=pedantic]

Issue ##23916
2023-07-04 21:18:30 +03:00
Alexander Smorkalov
8839bd572e
Merge pull request #23815 from LaurentBerger:CAP_IMAGES
Add single image support to VideoCapture
2023-07-04 16:31:29 +03:00
Alexander Smorkalov
c9d8b541fc
Merge pull request #23896 from mshabunin:test-cap-images
videoio: tests for CAP_IMAGES
2023-07-04 16:30:53 +03:00
Alexander Alekhin
67faf1610e Merge pull request #23885 from hanliutong:UniversalIntrinsicRewriter 2023-07-03 14:56:30 +00:00
Alexander Smorkalov
377be68d92
Merge pull request #23892 from vrabaud:compile_fix
Fix compilation when HAVE_QUIRC is not set.
2023-07-03 13:16:49 +03:00
Wang Kai
0661aff4a5
Merge pull request #23900 from kai-waang:fixing-typo
Fixing typos in usac #23900

Just read and correct some typos in `usac`
### 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
2023-07-03 12:08:12 +03:00
Vincent Rabaud
e9414169a3 Fix compilation when HAVE_QUIRC is not set.
One variable is unknown while the other one is unused.
Fixed build warnings.
2023-07-03 11:35:05 +03:00
Maksim Shabunin
1d9c0d3e12 videoio: tests for CAP_IMAGES 2023-07-03 10:33:16 +03:00
Wang Kai
d25d44156b removing unreachable codes in gbackend 2023-07-02 15:33:52 +08:00
Wang Kai
bca5868817 removing duplicated statement 2023-07-01 13:29:02 +08:00
Alexander Smorkalov
131dab774c Merge branch 'release_4.8.0' into 4.x 2023-06-28 15:22:43 +03:00
Alexander Smorkalov
f9a59f2592 Release OpenCV 4.8.0 2023-06-28 14:53:33 +03:00
Anatoliy Talamanov
b8b8c7c9e5
Merge pull request #23884 from TolyaTalamanov:at/fix-async-infer-ov-backend
G-API: Fix async inference for OpenVINO backend #23884

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] 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
2023-06-28 14:52:15 +03:00
Liutong HAN
d17507052e Rewrite SIMD code by using new Universal Intrinsic API. 2023-06-28 17:12:37 +08:00
Alexander Smorkalov
bf06bc92aa Merge branch '3.4' into merge-3.4 2023-06-23 20:12:58 +03:00
Yuantao Feng
aff420329c
Merge pull request #23853 from fengyuentau:disable_fp16_warning
dnn: disable warning when loading a fp16 model #23853

### 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
2023-06-23 19:52:04 +03:00
Alexander Smorkalov
21d79abb1f
Merge pull request #23859 from TolyaTalamanov:at/ov-backend-core-wa
G-API: Apply ov::Core lifetime WA for OpenVINO Backend
2023-06-23 19:49:06 +03:00
Alexander Smorkalov
d9a5603fa3
Merge pull request #23860 from fengyuentau:fix_overflow_sigmoid_v3.4
dnn: fix overflow in sigmoid layer for 3.4
2023-06-23 19:47:42 +03:00
Alexander Smorkalov
ee97dd5211
Merge pull request #23806 from asmorkalov:as/usac_drop_mat_ptr
Get rid of unsafe raw pointers to Mat object in USAC
2023-06-23 16:23:03 +03:00
fengyuentau
29388f80a5 fix overflow 2023-06-23 21:22:21 +08:00
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
TolyaTalamanov
c0fda696f3 Apply ov::Core WA 2023-06-23 12:16:21 +00:00
Paul Kim (김형준)
3b264d5877
Add pthread.h Inclusion if HAVE_PTHREADS_PF is defined
Single-case tested with success on Windows 11 with MinGW-w64 Standalone GCC v13.1.0 while building OpenCV 4.7.0
2023-06-23 17:53:03 +09:00
Alexander Smorkalov
0866a135c6 Git rid of unsafe raw pointers to Mat object. 2023-06-23 09:20:24 +03:00
Alexander Smorkalov
2849a774e3
Merge pull request #23846 from asmorkalov:as/ffmpeg_update_4.x
FFmpeg/4.x: update FFmpeg wrapper 2023.6
2023-06-22 21:00:06 +03:00
Alexander Panov
affc69bf1f
Merge pull request #23848 from AleksandrPanov:fix_detectDiamonds_api
Fix detect diamonds api #23848

`detectDiamonds` cannot be called from python, reproducer:

```
import numpy as np
import cv2 as cv

detector = cv.aruco.CharucoDetector(
    cv.aruco.CharucoBoard(
        (3, 3), 200.0, 100.0,
        cv.aruco.getPredefinedDictionary(cv.aruco.DICT_4X4_250)
    )
)
image = np.zeros((640, 480, 1), dtype=np.uint8)
res = detector.detectDiamonds(image)
print(res)
```

The error in `detectDiamonds` API fixed by replacing `InputOutputArrayOfArrays markerIds` with `InputOutputArray markerIds`.


### 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
2023-06-22 17:30:44 +03:00
Dmitry Kurtaev
22b747eae2
Merge pull request #23702 from dkurt:py_rotated_rect
Python binding for RotatedRect #23702

### Pull Request Readiness Checklist

related: https://github.com/opencv/opencv/issues/23546#issuecomment-1562894602

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
2023-06-22 15:09:53 +03:00
Alexander Smorkalov
426b088754 FFmpeg/4.x: update FFmpeg wrapper 2023.6 2023-06-22 13:58:58 +03:00
Anatoliy Talamanov
60848519b5
Merge pull request #23843 from TolyaTalamanov:at/fix-missing-opaque-kind-for-kernel
G-API: Fix incorrect OpaqueKind for Kernel outputs #23843

### Pull Request Readiness Checklist

#### Overview
The PR is going to fix several problems:
1. Major: `GKernel` doesn't hold `kind` for its outputs. Since `GModelBuilder` traverse graph from outputs to inputs once it reaches any output of the operation it will use its `kind` to create  `Data` meta for all operation outputs. Since it essential for `python` to know `GTypeInfo` (which is `shape` and `kind`) it will be confused.

Consider this operation:
```
 @cv.gapi.op('custom.square_mean', in_types=[cv.GArray.Int], out_types=[cv.GOpaque.Float, cv.GArray.Int])
    class GSquareMean:
        @staticmethod
        def outMeta(desc):
            return cv.empty_gopaque_desc(), cv.empty_array_desc()
```
Even though `GOpaque` is `Float`, corresponding metadata might have `Int` kind because it might be taken from `cv.GArray.Int`
so it will be a problem if one of the outputs of these operation is graph output because python will cast it to the wrong type based on `Data` meta.

2. Minor: Some of the OpenVINO `IR`'s doesn't any layout information for input. It's usually true only for `IRv10` but since `OpenVINO 2.0` need this information to correctly configure resize we need to put default layout if there no such assigned in `ov::Model`. 

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] 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
2023-06-22 12:46:25 +03:00
Alexander Smorkalov
61d48dd0f8
Merge pull request #23540 from cudawarped:add_CAP_PROP_CODEC_FOURCC
`VideoCapture`: change `CAP_PROP_FOURCC` to fix #22876
2023-06-22 12:21:59 +03:00
Alexander Alekhin
1656e7573e gapi: fix static build with openvino 2023-06-21 14:17:44 +00:00
Alexander Smorkalov
fc810434de
Merge pull request #23801 from VadimLevin:dev/vlevin/python-stubs-api-refinement
feat: manual refinement for Python API definition
2023-06-21 10:44:36 +03:00
Alexander Smorkalov
65b957a5b3
Merge pull request #23832 from asmorkalov:as/reshape_docs
Document parameters of multi-dimentional reshape
2023-06-21 09:04:17 +03:00
Alexander Smorkalov
9eaa7bd566 Document parameters of multi-dimentional reshape. 2023-06-20 21:54:49 +03:00
Vadim Levin
f20edba925 fix: conditionally define generic NumPy NDArray alias 2023-06-20 20:05:58 +03:00
Alexander Smorkalov
fe4f5b539e
Merge pull request #23835 from VadimLevin:dev/vlevin/fix-ast-nodes-required-usage-imports
fix: AST nodes required usage imports
2023-06-20 18:34:07 +03:00
Vadim Levin
06b40aef91 fix: AST nodes required usage imports 2023-06-20 16:31:55 +03:00
Alexander Smorkalov
51702ffd92 pre: OpenCV 4.8.0 (version++) 2023-06-20 15:52:57 +03:00
Alexander Smorkalov
805946baaf pre: OpenCV 3.4.20 (version++) 2023-06-20 14:10:08 +03:00
Alexander Smorkalov
726ba0210e
Merge pull request #23825 from ulvido:4.x
if browser supports wasm but only asm.js path provided use asm.js as fallback
2023-06-20 13:35:18 +03:00
Anatoliy Talamanov
71790e12ad
Merge pull request #23799 from TolyaTalamanov:at/ov20-backend-implement-missing-kernels
G-API: Implement InferROI, InferList, InferList2 for OpenVINO backend #23799

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] 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
2023-06-20 13:29:23 +03:00
Anatoliy Talamanov
0cf45b89ec
Merge pull request #23796 from TolyaTalamanov:at/align-ie-backend-with-latest-openvino
G-API: Align IE Backend with the latest OpenVINO version #23796

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] 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
2023-06-20 12:33:08 +03:00
Alexander Smorkalov
004801f1c5 Merge remote-tracking branch 'origin/3.4' into merge-3.4 2023-06-20 09:56:57 +03:00
lamm45
ddcbd2cc26
Merge pull request #22798 from lamm45:distransform-large
Fix distransform to work with large images #22798

This attempts to fix the following bug which was caused by storing squares of large integers into 32-bit floating point variables:
https://github.com/opencv/opencv/issues/22732


### 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
2023-06-19 15:11:01 +03:00
Ulvi YELEN
d6d15c136a
if browser supports wasm but only asm.js path provided use asm.js as fallback 2023-06-17 09:38:57 +03:00
Alexander Smorkalov
a4a739b99e Force mat_wrapper import to satisfy dependencies for MatLike alias. 2023-06-16 21:51:17 +03:00
Alexander Smorkalov
c0d4e16833
Merge pull request #23819 from asmorkalov:as/objdetect_no_dnn
Fixed barcode to be built without DNN
2023-06-16 20:03:45 +03:00
Vadim Levin
94703fc5b0
Merge pull request #23816 from VadimLevin:dev/vlevin/export-all-caps-enum-constants
Export enums ALL_CAPS version to typing stub files #23816

- Export ALL_CAPS versions alongside from normal names for enum constants, since both versions are available in runtime
- Change enum names entries comments to documentary strings

Before patch
```python
RMat_Access_R: int
RMat_Access_W: int
RMat_Access = int  # One of [R, W]
```
After patch
```python
RMat_Access_R: int
RMAT_ACCESS_R: int
RMat_Access_W: int
RMAT_ACCESS_W: int
RMat_Access = int
"""One of [RMat_Access_R, RMAT_ACCESS_R, RMat_Access_W, RMAT_ACCESS_W]"""
```

Resolves: #23776

### 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
2023-06-16 20:03:19 +03:00
Alexander Smorkalov
496474392e
Merge pull request #23809 from VadimLevin:dev/vlevin/re-export-stubs-submodules
feat: re-export symbols to cv2 level
2023-06-16 20:01:24 +03:00
Dmitry Kurtaev
433c364456
Merge pull request #23724 from dkurt:java_without_ant
Build Java without ANT #23724

### Pull Request Readiness Checklist

Enables a path of building Java bindings without ANT

* Able to build OpenCV JAR and Docs without ANT
  ```
  --   Java:
  --     ant:                         NO
  --     JNI:                         /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include/linux /usr/lib/jvm/default-java/include
  --     Java wrappers:               YES
  --     Java tests:                  NO
  ```
* Possible to build OpenCV JAR without ANT but tests still require ANT

**Merge with**: https://github.com/opencv/opencv_contrib/pull/3502

Notes:
- Use `OPENCV_JAVA_IGNORE_ANT=1` to force "Java" flow for building Java bindings
- Java tests still require Apache ANT
- JAR doesn't include `.java` source code files.


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.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-06-16 19:58:20 +03:00
Dmitry Kurtaev
ec95efca10
Merge pull request #23754 from dkurt:remap_linear_transparent
Keep inliers for linear remap with BORDER_TRANSPARENT #23754

Address https://github.com/opencv/opencv/issues/23562

### Pull Request Readiness Checklist

resolves https://github.com/opencv/opencv/issues/23562

I do think that this is a bug because with `INTER_CUBIC + BORDER_TRANSPARENT` the last column and row are preserved. So same should be done for `INTER_LINEAR`

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
2023-06-16 18:30:21 +03:00
Alexander Smorkalov
003d048b0d
Merge pull request #23813 from VadimLevin:dev/vlevin/runtime-typing-module
fix: typing module enums references
2023-06-16 18:20:44 +03:00
Alexander Smorkalov
b6d1402361 Fixed barcode to be built without DNN 2023-06-16 15:12:49 +03:00
unknown
1eaa074a49 remove line 2023-06-16 11:28:11 +02:00
cudawarped
024c836462 cv::VideoCapture: change CAP_PROP_FOURCC to prefer codec_id over codec_tag 2023-06-16 11:56:44 +03:00
Maksym Ivashechkin
44881592c3
Merge pull request #23078 from ivashmak:update_vsac
Update USAC #23078

### Pull Request Readiness Checklist

- [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
2023-06-16 10:59:13 +03:00
Alexander Smorkalov
3c0b71bcec
Merge pull request #23795 from dkurt:tf_half_pixel_for_nn
Consider half pixel mode in ONNX resize
2023-06-16 10:21:20 +03:00
Alexander Smorkalov
a9d547dfee
Merge pull request #23807 from mshabunin:barcode-test
objdetect: updated barcode test
2023-06-16 10:10:27 +03:00
Vadim Levin
69ebecc54f feat: add OpenCV error class to cv2/__init__.pyi 2023-06-15 23:10:10 +03:00
unknown
8762c37c22 solve issue 23808 2023-06-15 21:29:18 +02:00
Vadim Levin
a3b6a5b606 fix: typing module enums references
Enum names exist only during type checking.
During runtime they should be denoted as named integral types
2023-06-15 21:29:40 +03:00
dizcza
e625b32841 [opencv 3.x] back-ported tbb support ubuntu 22.04 2023-06-15 19:30:40 +03:00
Dmitry Kurtaev
924c01dbec
Replace CV_Assert_N 2023-06-15 17:30:33 +03:00
Alexander Smorkalov
0d7c039ea1
Merge pull request #23797 from asmorkalov:as/barcode_js_bindings
Barcode js bindings
2023-06-15 17:29:20 +03:00
Alexander Smorkalov
291689a178
Merge pull request #23800 from kai-waang:4.x
removing unreachable code and fixing a typo
2023-06-15 17:28:33 +03:00
Vadim Levin
1acbeb217b feat: re-export symbols to cv2 level
- Re-export native submodules of cv2 package level.
- Re-export  manually registered  symbols like cv2.mat_wrapper.Mat
2023-06-15 16:32:48 +03:00
Maksim Shabunin
2b3424b536 objdetect: updated barcode test 2023-06-15 15:32:19 +03:00
Alexander Smorkalov
538b13aeec JS bindings for bar code detector. 2023-06-15 15:01:01 +03:00
Alexander Smorkalov
0dde3b65d5
Merge pull request #23798 from VadimLevin:dev/vlevin/runtime-typing-module
feat: provide cv2.typing aliases at runtime
2023-06-15 14:41:13 +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
Vadim Levin
5859a531e5 feat: manual refinement for Python API definition
Mark `resize` and `calcHist` arguments as optional regardless of
their C++ API optionality
2023-06-14 21:24:05 +03:00
Vadim Levin
8e8638431d feat: provide cv2.typing aliases at runtime 2023-06-14 20:09:32 +03:00
Wang Kai
fc2d933224 removing unreachable code and fixing a typo 2023-06-15 01:09:02 +08:00
Alexander Smorkalov
52f46589a0
Merge pull request #23790 from asmorkalov:as/qrcode_aruco_js
JS bindings for Aruco-based QR code detector
2023-06-14 17:05:09 +03:00
Dmitry Kurtaev
6909fffde1 Consider half pixel mode in ONNX resize 2023-06-14 14:21:28 +03:00
Damiano Falcioni
19f4f2eb92
Merge pull request #23785 from damianofalcioni:4.x
added Aruco MIP dictionaries #23785

added Aruco MIP dictionaries: DICT_ARUCO_MIP_16h3, DICT_ARUCO_MIP_25h7, DICT_ARUCO_MIP_36h12 from [Aruco.js](https://github.com/damianofalcioni/js-aruco2), converted in opencv format using https://github.com/damianofalcioni/js-aruco2/blob/master/src/dictionaries/utils/dic2opencv.js

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] 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
2023-06-14 13:29:30 +03:00
Anatoliy Talamanov
b854d4ecd8
Merge pull request #23786 from TolyaTalamanov:at/expose-preprocessing-to-ie-backend
G-API: Expose explicit preprocessing for IE Backend #23786

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] 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
2023-06-14 09:29:49 +03:00
Alexander Smorkalov
b522148bd9
Merge pull request #23788 from dkurt:py_scalar_assign
Change Scalar assignment in Python from single value
2023-06-13 18:12:00 +03:00
Anatoliy Talamanov
a371bdac9d
Merge pull request #23766 from TolyaTalamanov:at/segmentation-demo-desync
G-API: Refine Semantic Segmentation Demo #23766

### Overview
* Supported demo working with camera id (e.g `--input=0`)
* Supported 3d output segmentation models (e.g `deeplabv3`)
* Supported `desync` execution
* Supported higher camera resolution
* Changed the color map to pascal voc (https://cloud.githubusercontent.com/assets/4503207/17803328/1006ca80-65f6-11e6-9ff6-36b7ef5b9ac6.png)

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] 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
2023-06-13 18:06:19 +03:00
Alexander Smorkalov
3af6001a75 JS bindings for Aruco-based QR code detector. 2023-06-13 17:20:52 +03:00
Alexander Smorkalov
843daca26e JS bingings fix for QR code detector. 2023-06-13 15:36:29 +03:00
Dmitry Kurtaev
f9d7f47e28 Change Scalar assignment in Python from single value 2023-06-13 10:45:03 +03:00
Alexander Smorkalov
e60a7c0d49
Merge pull request #23775 from kai-waang:fixing-typo
fixing typo of a variable name in dnn::runFastConv
2023-06-12 17:50:12 +03:00
zihaomu
37459f89c9 remove unsupported unsupported unicode 2023-06-11 23:02:34 +08:00
Wang Kai
4622f1e89b fixing typo of a variable name in dnn::runFastConv 2023-06-11 01:54:03 +08:00
Alexander Smorkalov
6ca697bc12
Merge pull request #23725 from asmorkalov:as/aruco_js_refresh
Refreshed JavaScript bindings for Aruco related algorithms
2023-06-10 09:21:24 +03:00
Sean McBride
57da72d444 Fixed invalid cast and unaligned memory access
Although acceptible to Intel CPUs, it's still undefined behaviour according to the C++ standard.

It can be replaced with memcpy, which makes the code simpler, and it generates the same assembly code with gcc and clang with -O2 (verified with godbolt).

Also expanded the test to include other little endian CPUs by testing for __LITTLE_ENDIAN__.
2023-06-09 18:56:49 -04:00
Alexander Smorkalov
fe14e7ab24
Merge pull request #23758 from AleksandrPanov:add_GenericGraphicalCode_interface
Add graphical code detector interface
2023-06-09 15:46:32 +03:00
Alexander Smorkalov
61488885b5 Refreshed JavaScript bindings for Aruco related algorithms. 2023-06-09 15:43:43 +03:00
Vincent Rabaud
472aad46a6
Merge pull request #23596 from vrabaud:libavif
Add AVIF support through libavif. #23596

This is to fix https://github.com/opencv/opencv/issues/19271
Extra: https://github.com/opencv/opencv_extra/pull/1069

### 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
2023-06-09 15:39:10 +03:00
Alexander Smorkalov
0c8e6e0e68
Merge pull request #23740 from Peekabooc:4.x
fixing typo in stitching parameter names
2023-06-09 13:40:02 +03:00
Pierre Chatelier
60b806f9b8
Merge pull request #22947 from chacha21:hasNonZero
Added cv::hasNonZero() #22947 

`cv::hasNonZero()` is semantically equivalent to (`cv::countNonZero()>0`) but stops parsing the image when a non-zero value is found, for a performance gain

- [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

This pull request might be refused, but I submit it to know if further work is needed or if I just stop working on it.
The idea is only a performance gain vs `countNonZero()>0` at the cost of more code.

Reasons why it might be refused :

- this is just more code
- the execution time is "unfair"/"unpredictable" since it depends on the position of the first non-zero value
- the user must be aware that default search is from first row/col to last row/col and has no way to customize that, even if his use case lets him know where a non zero could be found
- the PR in its current state is using, for the ocl implementation, a mere `countNonZero()>0` ; there is not much sense in trying to break early the ocl kernel call when non-zero is encountered. So the ocl implementation does not bring any improvement.
- there is no IPP function that can help (`countNonZero()` is based in `ippCountInRange`)
- the PR in its current state might be slower than a call to `countNonZero()>0` in some cases (see "challenges" below)

Reasons why it might be accepted :

- the performance gain is huge on average, if we consider that "on average" means "non zero in the middle of the image"
- the "missing" IPP implementation is replaced by an "Open-CV universal intrinsics" implementation
- the PR in its current state is almost always faster than a call to `countNonZero()>0`, is only slightly slower in the worst cases, and not even for all matrices

**Challenges**
The worst case is either an all-zero matrix, or a non-zero at the very last position.  In such a case, the `hasNonZero()` implementation will parse the whole matrix like `countNonZero()` would do. But we expect the performance to be the same in this case. And `ippCountInRange` is hard to beat !
There is also the case of very small matrices (<=32x32...) in 8b, where the SIMD can be hard to feed.

For all cases but the worse, my custom `hasNonZero()` performs better than `ippCountInRange()`
For the worst case, my custom `hasNonZero()` performs better than `ippCountInRange()` *except for large matrices of type CV_32S or CV_64F* (but surprisingly, not CV_32F).
The difference is small, but it exists (and I don't understand why).
For very small CV_8U matrices `ippCountInRange()` seems unbeatable.

Here is the code that I use to check timings

```

  //test cv::hasNonZero() vs (cv::countNonZero()>0) for different matrices sizes, types, strides...
  {
    cv::setRNGSeed(1234);
    const std::vector<cv::Size> sizes = {{32, 32}, {64, 64}, {128, 128}, {320, 240}, {512, 512}, {640, 480}, {1024, 768}, {2048, 2048}, {1031, 1000}};
    const std::vector<int> types = {CV_8U, CV_16U, CV_32S, CV_32F, CV_64F};
    const size_t iterations = 1000;
    for(const cv::Size& size : sizes)
    {
      for(const int type : types)
      {
        for(int c = 0 ; c<2 ; ++c)
        {
          const bool continuous = !c;
          for(int i = 0 ; i<4 ; ++i)
          {
            cv::Mat m = continuous ? cv::Mat::zeros(size, type) : cv::Mat(cv::Mat::zeros(cv::Size(2*size.width, size.height), type), cv::Rect(cv::Point(0, 0), size));
            const bool nz = (i <= 2);
            const unsigned int nzOffsetRange = 10;
            const unsigned int nzOffset = cv::randu<unsigned int>()%nzOffsetRange;
            const cv::Point pos = 
              (i == 0) ? cv::Point(nzOffset, 0) :
              (i == 1) ? cv::Point(size.width/2-nzOffsetRange/2+nzOffset, size.height/2) :
              (i == 2) ? cv::Point(size.width-1-nzOffset, size.height-1) :
              cv::Point(0, 0);
            std::cout << "============================================================" << std::endl;
            std::cout << "size:" << size << "  type:" << type << "  continuous = " << (continuous ? "true" : "false") << "  iterations:" << iterations << "  nz=" << (nz ? "true" : "false");
            std::cout << "  pos=" << ((i == 0) ? "begin" : (i == 1) ? "middle" : (i == 2) ? "end" : "none");
            std::cout << std::endl;
            cv::Mat mask = cv::Mat::zeros(size, CV_8UC1);
            mask.at<unsigned char>(pos) = 0xFF;
            m.setTo(cv::Scalar::all(0));
            m.setTo(cv::Scalar::all(nz ? 1 : 0), mask);
            std::vector<bool> results;
            std::vector<double> timings;

            {
              bool res = false;
              auto ref = cv::getTickCount();
              for(size_t k = 0 ; k<iterations ; ++k)
                res = cv::hasNonZero(m);
              auto now = cv::getTickCount();
              const bool error = (res != nz);
              if (error)
                printf("!!ERROR!!\r\n");
              results.push_back(res);
              timings.push_back(1000.*(now-ref)/cv::getTickFrequency());
            }
            {
              bool res = false;
              auto ref = cv::getTickCount();
              for(size_t k = 0 ; k<iterations ; ++k)
                res = (cv::countNonZero(m)>0);
              auto now = cv::getTickCount();
              const bool error = (res != nz);
              if (error)
                printf("!!ERROR!!\r\n");
              results.push_back(res);
              timings.push_back(1000.*(now-ref)/cv::getTickFrequency());
            }

            const size_t bestTimingIndex = (std::min_element(timings.begin(), timings.end())-timings.begin());
            if ((bestTimingIndex != 0) || (std::find_if_not(results.begin(), results.end(), [&](bool r) {return (r == nz);}) != results.end()))
            {
              std::cout << "cv::hasNonZero\t\t=>" << results[0] << ((results[0] != nz) ? "  ERROR" : "") << "   perf:" << timings[0] << "ms => " << (iterations/timings[0]*1000) << " im/s" << ((bestTimingIndex == 0) ? " * " : "") << std::endl;
              std::cout << "cv::countNonZero\t=>" << results[1] << ((results[1] != nz) ? "  ERROR" : "") << "   perf:" << timings[1] << "ms => " << (iterations/timings[1]*1000) << " im/s" << ((bestTimingIndex == 1) ? " * " : "") << std::endl;
            }
          }
        }
      }
    }
  }

```

Here is a report of this benchmark (it only reports timings when `cv::countNonZero()` is faster)
My CPU is an Intel Core I7 4790 @ 3.60Ghz

```

============================================================
size:[32 x 32]  type:0  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[32 x 32]  type:0  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[32 x 32]  type:0  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[32 x 32]  type:0  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[32 x 32]  type:0  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[32 x 32]  type:0  continuous = false  iterations:1000  nz=true  pos=middle
cv::hasNonZero          =>1   perf:0.353764ms => 2.82674e+06 im/s
cv::countNonZero        =>1   perf:0.282044ms => 3.54555e+06 im/s *
============================================================
size:[32 x 32]  type:0  continuous = false  iterations:1000  nz=true  pos=end
cv::hasNonZero          =>1   perf:0.610478ms => 1.63806e+06 im/s
cv::countNonZero        =>1   perf:0.283182ms => 3.5313e+06 im/s *
============================================================
size:[32 x 32]  type:0  continuous = false  iterations:1000  nz=false  pos=none
cv::hasNonZero          =>0   perf:0.630115ms => 1.58701e+06 im/s
cv::countNonZero        =>0   perf:0.282044ms => 3.54555e+06 im/s *
============================================================
size:[32 x 32]  type:2  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[32 x 32]  type:2  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[32 x 32]  type:2  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[32 x 32]  type:2  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[32 x 32]  type:2  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[32 x 32]  type:2  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[32 x 32]  type:2  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[32 x 32]  type:2  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[32 x 32]  type:4  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[32 x 32]  type:4  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[32 x 32]  type:4  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[32 x 32]  type:4  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[32 x 32]  type:4  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[32 x 32]  type:4  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[32 x 32]  type:4  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[32 x 32]  type:4  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[32 x 32]  type:5  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[32 x 32]  type:5  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[32 x 32]  type:5  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[32 x 32]  type:5  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[32 x 32]  type:5  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[32 x 32]  type:5  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[32 x 32]  type:5  continuous = false  iterations:1000  nz=true  pos=end
cv::hasNonZero          =>1   perf:0.607347ms => 1.64651e+06 im/s
cv::countNonZero        =>1   perf:0.467037ms => 2.14116e+06 im/s *
============================================================
size:[32 x 32]  type:5  continuous = false  iterations:1000  nz=false  pos=none
cv::hasNonZero          =>0   perf:0.618162ms => 1.6177e+06 im/s
cv::countNonZero        =>0   perf:0.468175ms => 2.13595e+06 im/s *
============================================================
size:[32 x 32]  type:6  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[32 x 32]  type:6  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[32 x 32]  type:6  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[32 x 32]  type:6  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[32 x 32]  type:6  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[32 x 32]  type:6  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[32 x 32]  type:6  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[32 x 32]  type:6  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[64 x 64]  type:0  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[64 x 64]  type:0  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[64 x 64]  type:0  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[64 x 64]  type:0  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[64 x 64]  type:0  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[64 x 64]  type:0  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[64 x 64]  type:0  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[64 x 64]  type:0  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[64 x 64]  type:2  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[64 x 64]  type:2  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[64 x 64]  type:2  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[64 x 64]  type:2  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[64 x 64]  type:2  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[64 x 64]  type:2  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[64 x 64]  type:2  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[64 x 64]  type:2  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[64 x 64]  type:4  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[64 x 64]  type:4  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[64 x 64]  type:4  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[64 x 64]  type:4  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[64 x 64]  type:4  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[64 x 64]  type:4  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[64 x 64]  type:4  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[64 x 64]  type:4  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[64 x 64]  type:5  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[64 x 64]  type:5  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[64 x 64]  type:5  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[64 x 64]  type:5  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[64 x 64]  type:5  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[64 x 64]  type:5  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[64 x 64]  type:5  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[64 x 64]  type:5  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[64 x 64]  type:6  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[64 x 64]  type:6  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[64 x 64]  type:6  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[64 x 64]  type:6  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[64 x 64]  type:6  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[64 x 64]  type:6  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[64 x 64]  type:6  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[64 x 64]  type:6  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[128 x 128]  type:0  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[128 x 128]  type:0  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[128 x 128]  type:0  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[128 x 128]  type:0  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[128 x 128]  type:0  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[128 x 128]  type:0  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[128 x 128]  type:0  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[128 x 128]  type:0  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[128 x 128]  type:2  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[128 x 128]  type:2  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[128 x 128]  type:2  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[128 x 128]  type:2  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[128 x 128]  type:2  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[128 x 128]  type:2  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[128 x 128]  type:2  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[128 x 128]  type:2  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[128 x 128]  type:4  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[128 x 128]  type:4  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[128 x 128]  type:4  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[128 x 128]  type:4  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[128 x 128]  type:4  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[128 x 128]  type:4  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[128 x 128]  type:4  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[128 x 128]  type:4  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[128 x 128]  type:5  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[128 x 128]  type:5  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[128 x 128]  type:5  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[128 x 128]  type:5  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[128 x 128]  type:5  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[128 x 128]  type:5  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[128 x 128]  type:5  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[128 x 128]  type:5  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[128 x 128]  type:6  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[128 x 128]  type:6  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[128 x 128]  type:6  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[128 x 128]  type:6  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[128 x 128]  type:6  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[128 x 128]  type:6  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[128 x 128]  type:6  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[128 x 128]  type:6  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[320 x 240]  type:0  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[320 x 240]  type:0  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[320 x 240]  type:0  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[320 x 240]  type:0  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[320 x 240]  type:0  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[320 x 240]  type:0  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[320 x 240]  type:0  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[320 x 240]  type:0  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[320 x 240]  type:2  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[320 x 240]  type:2  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[320 x 240]  type:2  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[320 x 240]  type:2  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[320 x 240]  type:2  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[320 x 240]  type:2  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[320 x 240]  type:2  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[320 x 240]  type:2  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[320 x 240]  type:4  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[320 x 240]  type:4  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[320 x 240]  type:4  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[320 x 240]  type:4  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[320 x 240]  type:4  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[320 x 240]  type:4  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[320 x 240]  type:4  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[320 x 240]  type:4  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[320 x 240]  type:5  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[320 x 240]  type:5  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[320 x 240]  type:5  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[320 x 240]  type:5  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[320 x 240]  type:5  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[320 x 240]  type:5  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[320 x 240]  type:5  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[320 x 240]  type:5  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[320 x 240]  type:6  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[320 x 240]  type:6  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[320 x 240]  type:6  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[320 x 240]  type:6  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[320 x 240]  type:6  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[320 x 240]  type:6  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[320 x 240]  type:6  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[320 x 240]  type:6  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[512 x 512]  type:0  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[512 x 512]  type:0  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[512 x 512]  type:0  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[512 x 512]  type:0  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[512 x 512]  type:0  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[512 x 512]  type:0  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[512 x 512]  type:0  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[512 x 512]  type:0  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[512 x 512]  type:2  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[512 x 512]  type:2  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[512 x 512]  type:2  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[512 x 512]  type:2  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[512 x 512]  type:2  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[512 x 512]  type:2  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[512 x 512]  type:2  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[512 x 512]  type:2  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[512 x 512]  type:4  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[512 x 512]  type:4  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[512 x 512]  type:4  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[512 x 512]  type:4  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[512 x 512]  type:4  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[512 x 512]  type:4  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[512 x 512]  type:4  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[512 x 512]  type:4  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[512 x 512]  type:5  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[512 x 512]  type:5  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[512 x 512]  type:5  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[512 x 512]  type:5  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[512 x 512]  type:5  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[512 x 512]  type:5  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[512 x 512]  type:5  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[512 x 512]  type:5  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[512 x 512]  type:6  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[512 x 512]  type:6  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[512 x 512]  type:6  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[512 x 512]  type:6  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[512 x 512]  type:6  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[512 x 512]  type:6  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[512 x 512]  type:6  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[512 x 512]  type:6  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[640 x 480]  type:0  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[640 x 480]  type:0  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[640 x 480]  type:0  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[640 x 480]  type:0  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[640 x 480]  type:0  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[640 x 480]  type:0  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[640 x 480]  type:0  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[640 x 480]  type:0  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[640 x 480]  type:2  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[640 x 480]  type:2  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[640 x 480]  type:2  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[640 x 480]  type:2  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[640 x 480]  type:2  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[640 x 480]  type:2  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[640 x 480]  type:2  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[640 x 480]  type:2  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[640 x 480]  type:4  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[640 x 480]  type:4  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[640 x 480]  type:4  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[640 x 480]  type:4  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[640 x 480]  type:4  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[640 x 480]  type:4  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[640 x 480]  type:4  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[640 x 480]  type:4  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[640 x 480]  type:5  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[640 x 480]  type:5  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[640 x 480]  type:5  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[640 x 480]  type:5  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[640 x 480]  type:5  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[640 x 480]  type:5  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[640 x 480]  type:5  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[640 x 480]  type:5  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[640 x 480]  type:6  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[640 x 480]  type:6  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[640 x 480]  type:6  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[640 x 480]  type:6  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[640 x 480]  type:6  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[640 x 480]  type:6  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[640 x 480]  type:6  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[640 x 480]  type:6  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[1024 x 768]  type:0  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[1024 x 768]  type:0  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[1024 x 768]  type:0  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[1024 x 768]  type:0  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[1024 x 768]  type:0  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[1024 x 768]  type:0  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[1024 x 768]  type:0  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[1024 x 768]  type:0  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[1024 x 768]  type:2  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[1024 x 768]  type:2  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[1024 x 768]  type:2  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[1024 x 768]  type:2  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[1024 x 768]  type:2  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[1024 x 768]  type:2  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[1024 x 768]  type:2  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[1024 x 768]  type:2  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[1024 x 768]  type:4  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[1024 x 768]  type:4  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[1024 x 768]  type:4  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[1024 x 768]  type:4  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[1024 x 768]  type:4  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[1024 x 768]  type:4  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[1024 x 768]  type:4  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[1024 x 768]  type:4  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[1024 x 768]  type:5  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[1024 x 768]  type:5  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[1024 x 768]  type:5  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[1024 x 768]  type:5  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[1024 x 768]  type:5  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[1024 x 768]  type:5  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[1024 x 768]  type:5  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[1024 x 768]  type:5  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[1024 x 768]  type:6  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[1024 x 768]  type:6  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[1024 x 768]  type:6  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[1024 x 768]  type:6  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[1024 x 768]  type:6  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[1024 x 768]  type:6  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[1024 x 768]  type:6  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[1024 x 768]  type:6  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[2048 x 2048]  type:0  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[2048 x 2048]  type:0  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[2048 x 2048]  type:0  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[2048 x 2048]  type:0  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[2048 x 2048]  type:0  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[2048 x 2048]  type:0  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[2048 x 2048]  type:0  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[2048 x 2048]  type:0  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[2048 x 2048]  type:2  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[2048 x 2048]  type:2  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[2048 x 2048]  type:2  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[2048 x 2048]  type:2  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[2048 x 2048]  type:2  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[2048 x 2048]  type:2  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[2048 x 2048]  type:2  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[2048 x 2048]  type:2  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[2048 x 2048]  type:4  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[2048 x 2048]  type:4  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[2048 x 2048]  type:4  continuous = true  iterations:1000  nz=true  pos=end
cv::hasNonZero          =>1   perf:895.381ms => 1116.84 im/s
cv::countNonZero        =>1   perf:882.569ms => 1133.06 im/s *
============================================================
size:[2048 x 2048]  type:4  continuous = true  iterations:1000  nz=false  pos=none
cv::hasNonZero          =>0   perf:899.53ms => 1111.69 im/s
cv::countNonZero        =>0   perf:870.894ms => 1148.24 im/s *
============================================================
size:[2048 x 2048]  type:4  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[2048 x 2048]  type:4  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[2048 x 2048]  type:4  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[2048 x 2048]  type:4  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[2048 x 2048]  type:5  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[2048 x 2048]  type:5  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[2048 x 2048]  type:5  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[2048 x 2048]  type:5  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[2048 x 2048]  type:5  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[2048 x 2048]  type:5  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[2048 x 2048]  type:5  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[2048 x 2048]  type:5  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[2048 x 2048]  type:6  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[2048 x 2048]  type:6  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[2048 x 2048]  type:6  continuous = true  iterations:1000  nz=true  pos=end
cv::hasNonZero          =>1   perf:2018.92ms => 495.313 im/s
cv::countNonZero        =>1   perf:1966.37ms => 508.552 im/s *
============================================================
size:[2048 x 2048]  type:6  continuous = true  iterations:1000  nz=false  pos=none
cv::hasNonZero          =>0   perf:2005.87ms => 498.537 im/s
cv::countNonZero        =>0   perf:1992.78ms => 501.812 im/s *
============================================================
size:[2048 x 2048]  type:6  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[2048 x 2048]  type:6  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[2048 x 2048]  type:6  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[2048 x 2048]  type:6  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[1031 x 1000]  type:0  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[1031 x 1000]  type:0  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[1031 x 1000]  type:0  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[1031 x 1000]  type:0  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[1031 x 1000]  type:0  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[1031 x 1000]  type:0  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[1031 x 1000]  type:0  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[1031 x 1000]  type:0  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[1031 x 1000]  type:2  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[1031 x 1000]  type:2  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[1031 x 1000]  type:2  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[1031 x 1000]  type:2  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[1031 x 1000]  type:2  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[1031 x 1000]  type:2  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[1031 x 1000]  type:2  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[1031 x 1000]  type:2  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[1031 x 1000]  type:4  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[1031 x 1000]  type:4  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[1031 x 1000]  type:4  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[1031 x 1000]  type:4  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[1031 x 1000]  type:4  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[1031 x 1000]  type:4  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[1031 x 1000]  type:4  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[1031 x 1000]  type:4  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[1031 x 1000]  type:5  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[1031 x 1000]  type:5  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[1031 x 1000]  type:5  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[1031 x 1000]  type:5  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[1031 x 1000]  type:5  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[1031 x 1000]  type:5  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[1031 x 1000]  type:5  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[1031 x 1000]  type:5  continuous = false  iterations:1000  nz=false  pos=none
============================================================
size:[1031 x 1000]  type:6  continuous = true  iterations:1000  nz=true  pos=begin
============================================================
size:[1031 x 1000]  type:6  continuous = true  iterations:1000  nz=true  pos=middle
============================================================
size:[1031 x 1000]  type:6  continuous = true  iterations:1000  nz=true  pos=end
============================================================
size:[1031 x 1000]  type:6  continuous = true  iterations:1000  nz=false  pos=none
============================================================
size:[1031 x 1000]  type:6  continuous = false  iterations:1000  nz=true  pos=begin
============================================================
size:[1031 x 1000]  type:6  continuous = false  iterations:1000  nz=true  pos=middle
============================================================
size:[1031 x 1000]  type:6  continuous = false  iterations:1000  nz=true  pos=end
============================================================
size:[1031 x 1000]  type:6  continuous = false  iterations:1000  nz=false  pos=none
done

```
2023-06-09 13:37:20 +03:00
Zihao Mu
eec8a20c33
Merge pull request #23763 from zihaomu:add_runtime_check
DNN: fix bug for X86 Winograd #23763

Address https://github.com/opencv/opencv/issues/23760
The patch aims to add a runtime check for X86 platform without AVX(2).

### 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
2023-06-09 09:18:12 +03:00
Alexander Smorkalov
5d913f4d72
Merge pull request #21959 from cpoerschke:4.x-intelligent-scissors-optimisation
imgproc: optimise local cost computation in IntelligentScissorsMB::buildMap
2023-06-08 16:45:04 +03:00
Alex
b729d8e821 added graphicalCodeDetector, remove QRCodeDetectorBase 2023-06-08 14:50:58 +03:00
Alexander Smorkalov
6d2cbc4055
Merge pull request #23761 from LaurentBerger:typeblobfromimages
checktype in blobFromImages and blobFromImagesWithParams
2023-06-08 09:59:01 +03:00
Christine Poerschke
f597838685 imgproc: optimise local cost computation in IntelligentScissorsMB::buildMap 2023-06-07 22:06:52 +01:00
TolyaTalamanov
af95395fe7 Fix ifdef condition 2023-06-07 15:42:54 +01:00
unknown
5f8e43da85 checktype in blobFromImages and blobFromImagesWithParams 2023-06-07 16:15:58 +02:00
Abduragim Shtanchaev
6b53fe8f7b
Merge pull request #23746 from Abdurrahheem:ash/graph_simplifier
Assertion Fix in Split Layer #23746

### Pull Request Readiness Checklist

This PR fixes issue mentioned in [#23663](https://github.com/opencv/opencv/issues/23663)
Merge with https://github.com/opencv/opencv_extra/pull/1067

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
2023-06-07 16:01:42 +03:00
Christine Poerschke
d3e7968927
Merge pull request #23688 from cpoerschke:4.x-pr-21959-prep
imgproc: add contour values check to IntelligentScissorsMB tests

Preparation for the #21959 changes as per @asmorkalov's https://github.com/opencv/opencv/pull/21959#issuecomment-1560511500 suggestion.

### 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
2023-06-07 11:32:17 +03:00
Alexander Smorkalov
b9ce87e8e2
Merge pull request #23750 from mshabunin:fix-bgr2hls-access
imgproc/cvtColor: fixed invalid read in BGR2HLS
2023-06-06 11:34:08 +03:00
Alexander Smorkalov
af03e000c7
Merge pull request #23732 from vekkuli:vekkuli-patch-create-featherblender
Fix missuse of try_gpu in stitching/FeatherBlender
2023-06-06 10:00:36 +03:00
Maksim Shabunin
adab462e42 imgproc/cvtColor: fixed invalid read in BGR2HLS 2023-06-05 23:25:44 +03:00
Alex
b5ac7ef2f2 fix cornerRefinementMethod binding 2023-06-05 11:04:11 +03:00
Wang Kai
983925c685 fixing typo 2023-06-04 19:06:26 +08:00
Jaakko Rantala
385003e9fe
Update blenders.cpp
Removed passing try_gpu parameter to FeatherBlender constructor because it only has sharpness parameter.
2023-06-02 16:46:05 +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
Anatoliy Talamanov
5330112f05
Merge pull request #23595 from TolyaTalamanov:at/implement-openvino-backend
[G-API] Implement OpenVINO 2.0 backend #23595

### Pull Request Readiness Checklist

Implemented basic functionality for `OpenVINO` 2.0 G-API backend.

#### Overview
- [x] Implement `Infer` kernel with some of essential configurable parameters + IR/Blob models format support.
- [ ] Implement the rest of kernels: `InferList`, `InferROI`, `Infer2` + other configurable params (e.g reshape)
- [x] Asyncrhonous execution support
- [ ] Remote context support

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
2023-06-02 14:31:03 +03:00
Alexander Smorkalov
2104d61d4a
Merge pull request #23668 from TolyaTalamanov:at/fix-resize-applying-logic-ie-backend
WIP: [G-API] IE Backend: Update the condition for applying the resize preprocessing
2023-06-01 13:55:07 +03:00
Alexander Smorkalov
0787c31f41 Python package classifiers sync with OpenCV-Python repo. 2023-06-01 10:49:27 +03:00
Anna Khakimova
6d3dd24622
Merge pull request #21797 from anna-khakimova:ak/merge3_extend_supported_types
GAPI Fluid SIMD:Add support of new several types for the Merge3

- Support of the new several types was added.
- Fixes for the Split/Merge and ConvertTo issues.
2023-05-31 14:59:39 +03:00
Dmitry Matveev
fc5d412ba7
Merge pull request #23597 from dmatveev:dm/gapi_onnx_py_integration
G-API: Integration branch for ONNX & Python-related changes #23597

# Changes overview

## 1. Expose ONNX backend's Normalization and Mean-value parameters in Python

* Since Python G-API bindings rely on `Generic` infer to express Inference, the `Generic` specialization of `onnx::Params` was extended with new methods to control normalization (`/255`) and mean-value; these methods were exposed in the Python bindings
* Found some questionable parts in the existing API which I'd like to review/discuss (see comments)

UPD:
1. Thanks to @TolyaTalamanov normalization inconsistencies have been identified with `squeezenet1.0-9` ONNX model itself; tests using these model were updated to DISABLE normalization and NOT using mean/value.
2. Questionable parts were removed and tests still pass.

### Details (taken from @TolyaTalamanov's comment):

`squeezenet1.0.*onnx` - doesn't require scaling to [0,1] and mean/std because the weights of the first convolution already scaled. ONNX documentation is broken. So the correct approach to use this models is:

1. ONNX: apply preprocessing from the documentation: https://github.com/onnx/models/blob/main/vision/classification/imagenet_preprocess.py#L8-L44 but without normalization step:
```
# DON'T DO IT:
# mean_vec = np.array([0.485, 0.456, 0.406])
# stddev_vec = np.array([0.229, 0.224, 0.225])
# norm_img_data = np.zeros(img_data.shape).astype('float32')
# for i in range(img_data.shape[0]):
#     norm_img_data[i,:,:] = (img_data[i,:,:]/255 - mean_vec[i]) / stddev_vec[i]
#     # add batch channel
#     norm_img_data = norm_img_data.reshape(1, 3, 224, 224).astype('float32')
#     return norm_img_data

# INSTEAD
return img_data.reshape(1, 3, 224, 224)
```

2. G-API: Convert image from BGR to RGB and then pass to `apply` as-is with configuring parameters:
```
net = cv.gapi.onnx.params('squeezenet', model_filename)
net.cfgNormalize('data_0', False)
```
**Note**: Results might be difference because `G-API` doesn't apply central crop but just do resize to model resolution.

---

`squeezenet1.1.*onnx` - requires scaling to [0,1] and mean/std - onnx documentation is correct.
1. ONNX: apply preprocessing from the documentation: https://github.com/onnx/models/blob/main/vision/classification/imagenet_preprocess.py#L8-L44
2. G-API: Convert image from BGR to RGB and then pass to `apply` as-is with configuring parameters:
```
net = cv.gapi.onnx.params('squeezenet', model_filename)
net.cfgNormalize('data_0', True) // default
net.cfgMeanStd('data_0', [0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
```
**Note**: Results might be difference because `G-API` doesn't apply central crop but just do resize to model resolution.

## 2. Expose Fluid & kernel package-related functionality in Python

* `cv::gapi::combine()`
* `cv::GKernelPackage::size()` (mainly for testing purposes)
* `cv::gapi::imgproc::fluid::kernels()`

Added a test for the above.

## 3. Fixed issues with Python stateful kernel handling

Fixed error message when `outMeta()` of custom python operation fails.

## 4. Fixed various issues in Python tests

1. `test_gapi_streaming.py` - fixed behavior of Desync test to avoid sporadic issues
2. `test_gapi_infer_onnx.py` - fixed model lookup (it was still using the ONNX Zoo layout but was NOT using the proper env var we use to point to one).

### 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
2023-05-30 17:52:17 +03:00
Pierre Chatelier
93d490213f
Merge pull request #23690 from chacha21:rotatedRectangleIntersection_precision
better accuracy for _rotatedRectangleIntersection() (proposal for #23546) #23690

_rotatedRectangleIntersection() can be (statically) customized to use double instead of float for better accuracy
this is a proposal for experimentation around #23546

for better accuracy, _rotatedRectangleIntersection() could use double. It will still return cv::Point2f list for backward compatibility, but the inner computations are controlled by a typedef

- [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
2023-05-30 17:46:39 +03:00
Olivier Hotel
0442c6fa81 Addition of normalize_axis to ONNXImporter::parseSqueeze to support negative values for the axes attribut.
Negative values are part of the ONNX optset>=11.

Signed-off-by: Olivier Hotel <olivier.hotel@orange.com>
2023-05-30 10:21:27 +02:00
Abduragim Shtanchaev
ecd2e8ff47 added index that check all inputs of nodes that
match
2023-05-29 14:48:42 +03:00
Alexander Smorkalov
02397ef851
Merge pull request #23567 from seanm:UBSan-overflow
Reformulated some pointer arithmetic to avoid (unsigned) overflow
2023-05-29 12:19:34 +03:00
Christine Poerschke
b5e9eb742c
Merge pull request #23698 from cpoerschke:4.x-pr-21959-perf
imgproc: add basic IntelligentScissorsMB performance test #23698

Adding basic performance test that can be used before and after the #21959 changes etc. as per @asmorkalov's https://github.com/opencv/opencv/pull/21959#issuecomment-1565240926 comment.

### 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
2023-05-29 11:02:59 +03:00
triple Mu
1bffe170e1
Update setup.py
Fix error:
UnboundLocalError: local variable 'typing_stub_files' referenced before assignment
2023-05-27 17:23:32 +08:00
Alexander Smorkalov
7b998c30e7
Merge pull request #23694 from dkurt:update_matchTemplateMask
Update matchTemplate with mask
2023-05-27 09:42:55 +03:00
Sean McBride
2083fdc9c0 Fixed UBSan warning about undefined pointer arithmetic overflow
Pointer arithmetic overflow is always undefined, whether signed or unsigned.

It warned here:

`Addition of unsigned offset to 0x00017fd31b97 overflowed to 0x00017fd30c97`

Convert the offset to a signed number, so that we can offset either forward or backwards.

In my own use of OpenCV at least, this is the only case of pointer arithmetic overflow.
2023-05-26 15:54:52 -04:00
Alexander Smorkalov
d1b158b9dd
Merge pull request #23692 from asmorkalov:as/ffmpeg_fps_3.4
backport to 3.4: Fixed FPS computation on some videos for FFmpeg backend
2023-05-26 20:47:13 +03:00
Dmitry Kurtaev
380caa1a87
Merge pull request #23691 from dkurt:pycv_float16_fixes
Import and export np.float16 in Python #23691

### Pull Request Readiness Checklist

* Also, fixes `cv::norm` with `NORM_INF` and `CV_16F`

resolves https://github.com/opencv/opencv/issues/23687

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
2023-05-26 18:56:21 +03:00
Alexander Smorkalov
900f17d563
Merge pull request #23677 from asmorkalov:as/objc_naming_backport
ObjC naming backport from 5.x
2023-05-26 18:54:34 +03:00
Dmitry Kurtaev
c97942cf78 Fix mask thresholding 2023-05-26 18:51:33 +03:00
captain-n3m0
6157db6462 Fixed matchTemplate function. #23585 2023-05-26 18:51:01 +03:00
Duong Dac
a9424868a1
Merge pull request #20370 from ddacw:stub-gen-next
Python typing stub generation #20370

Add stub generation to `gen2.py`, addressing #14590.

### 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 other license that is incompatible with OpenCV
- [x] The PR is proposed to proper branch
- [x] There is reference to 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-05-26 18:25:46 +03:00
Alexander Smorkalov
cbda161c39 Fixed FPS computation on some videos for FFmpeg backend. 2023-05-26 14:36:13 +03:00
Alexander Smorkalov
cf0ba039c3
Merge pull request #23625 from zihaomu:improve_conv
DNN: Remove unnecessary flags for convolution
2023-05-26 12:59:36 +03:00
Alexander Smorkalov
65487946cc Added final constrants check to solveLP to filter out flating-point numeric issues. 2023-05-25 17:29:01 +03:00
Dmitry Kurtaev
4823285b55
Merge pull request #23679 from dkurt:py_cv_type_macro
Python bindings for CV_8UC(n) and other types macros #23679

### Pull Request Readiness Checklist

resolves https://github.com/opencv/opencv/issues/23628#issuecomment-1562468327

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
2023-05-25 15:54:41 +03:00
Alexander Smorkalov
26a7b332cb
Merge pull request #23671 from zihaomu:fix_potential_bug
DNN: fix potential bug, stride should not be set as 0.
2023-05-25 13:36:37 +03:00
Yuantao Feng
f07b01cc34
Merge pull request #23655 from fengyuentau:qlinearsoftmax
Support ONNX operator QLinearSoftmax in dnn #23655

Resolves https://github.com/opencv/opencv/issues/23636.
Merge with https://github.com/opencv/opencv_extra/pull/1064.

This PR maps the QLinearSoftmax (from com.microsoft domain) to SoftmaxInt8 in dnn along with some speed optimization.

Todo:
- [x] support QLinearSoftmax with opset = 13
- [x] add model and test data for QLinearSoftmax with opset = 13
- [x] ensure all models have dims >= 3.
- [x] add the script to generate model and test data 

### 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
2023-05-25 13:35:58 +03:00
Alexander Smorkalov
bbda6f4c57 Backport 5.x: Support for module names that start from digit in ObjC bindings generator. 2023-05-25 11:45:59 +03:00
Dmitry Kurtaev
29b2f77b5f
Merge pull request #23674 from dkurt:py_cv_maketype
CV_MAKETYPE Python binding #23674 

### Pull Request Readiness Checklist

resolves https://github.com/opencv/opencv/issues/23628

```python
import cv2 as cv

t = cv.CV_MAKETYPE(cv.CV_32F, 4)
```

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
2023-05-25 09:45:22 +03:00
Maksim Shabunin
537060d96f
Merge pull request #23672 from mshabunin:fix-javadoc17 2023-05-24 23:07:27 +03:00
zihaomu
4384e77bd1 when stride ==0, it should be bug 2023-05-24 21:57:59 +08:00
TolyaTalamanov
dc714c1181 Change logic for applying resize 2023-05-24 13:06:19 +00:00
Alexander Smorkalov
d4861bfd1f Merge remote-tracking branch 'origin/3.4' into merge-3.4 2023-05-24 14:37:48 +03:00
Akshat Chauhan
c07145fe28
Merge pull request #23662 from akormous:docfix
Fix truncated sentenced in boxPoints documentation #22975 #23662

Resolves #22975

Completed the sentence as per the suggestion given in the issue #22975
### 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
2023-05-24 11:41:25 +03:00
Alexander Smorkalov
98d678c2d2 Added check that YUYV input of cvtColor has even width. 2023-05-23 14:17:43 +03:00
Alexander Smorkalov
4a559bc2ab
Merge pull request #23656 from peters:patch-2
Build fix for AVX 256
2023-05-23 09:20:34 +03:00
Alexander Smorkalov
e3c5c0906b
Merge pull request #23371 from cudawarped:cuda_add_futher_python_interop
`cuda`: Add bindings to allow `GpuMat` and `Stream` objects to be initialized from memory initialized in other libraries
2023-05-22 18:17:12 +03:00
Alexander Smorkalov
b122a4b436
Merge pull request #23646 from dkurt:dnn_ie_region_fix
Fix Region layer with OpenVINO in case of different width/height
2023-05-22 16:22:50 +03:00
Christine Poerschke
d00a96315e
Merge pull request #23612 from cpoerschke:3.4-issue-21532
QRCodeDetector: don't floodFill with outside-of-image seedPoint #23612

Fixes #21532.

### 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-05-22 13:34:30 +03:00
Peter Rekdal Khan-Sunde
04970490ec
Build fix
/build/build_cuda/3p/opencv/linux-x64/ubuntu22.04/Debug/modules/dnn/src/layers/cpu_kernels/convolution.cpp: In function 'void cv::dnn::packData8(char*&, float*&, int&, int&, int&, const int*, int, int, int)':
/build/build_cuda/3p/opencv/linux-x64/ubuntu22.04/Debug/modules/dnn/src/layers/cpu_kernels/convolution.cpp:448:43: error: 'CONV_NR' was not declared in this scope; did you mean 'CONV_3D'?
  448 |                 vx_store(inpbufC_FP32 + k*CONV_NR, vx_load(inptrInC + k1));
      |                                           ^~~~~~~
      |                                           CONV_3D
2023-05-22 11:25:04 +02:00
cudawarped
7539abecdb cuda: add python bindings to allow GpuMat and Stream objects to be initialized from raw pointers 2023-05-22 11:02:04 +03:00
Alexander Smorkalov
3f3c821800
Merge pull request #23631 from asmorkalov:as/eigen_NOMINMAX_warning_fix
Build warning fix on Windows for Eigen wrapper.
2023-05-19 21:06:41 +03:00
Alexander Smorkalov
c946285a07
Merge pull request #23601 from cudawarped:videocapture_threading
Videoio: FFMpeg remove locks from `VideoCapure/VideoWriter::open()` to fix 20114
2023-05-19 20:33:25 +03:00
Dmitry Kurtaev
c92135bdd1
Merge pull request #23634 from dkurt:fix_nearest_exact
Fix even input dimensions for INTER_NEAREST_EXACT #23634

### Pull Request Readiness Checklist

resolves https://github.com/opencv/opencv/issues/22204
related: https://github.com/opencv/opencv/issues/9096#issuecomment-1551306017

/cc @Yosshi999

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
2023-05-19 20:32:04 +03:00
Alexander Smorkalov
f2311d1bfd
Merge pull request #23645 from Abdurrahheem:ash/tf_init_input_check
Add assert to check if layer input size is not empty
2023-05-19 13:28:24 +03:00
Zihao Mu
5025f29378
speed up vulkan dnn, and support ios and apple m1 chip. (#23349) 2023-05-18 20:02:27 +03:00
Dmitry Kurtaev
af14780526 Fix Region layer with OpenVINO in case of different width/height 2023-05-18 17:45:30 +03:00
Abduragim Shtanchaev
2b9d2c726a add assert to check if layer input size is not empty 2023-05-18 16:17:57 +03:00
SoY Szala
340e999c45 Proposed solution for issue #23633 2023-05-17 23:06:59 +02:00
Abduragim Shtanchaev
d2143bcd44
Merge pull request #23614 from Abdurrahheem:lstm_layout_attribute
LSTM ONNX Layout Attribute Support #23614 

### Explanation

This PR contains necessary changes to support `layout` attribute. This attributes is present in [ONNX](https://github.com/onnx/onnx/blob/main/docs/Operators.md#lstm) and [Torch](https://pytorch.org/docs/stable/generated/torch.nn.LSTM.html#lstm) (in touch it is name as `batch_first=True`) libraries. When `layout = 1` input to LSTM layer is expected to have batch dimension first -> `[batch_size, sequence_length, features]` vs `layout = 0` - default `[sequence_length, batch_size, features]`

### Test Data

Test data and data generator for PR located here [#1063](https://github.com/opencv/opencv_extra/pull/1063)

### 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.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-05-17 22:46:56 +03:00
Alexander Smorkalov
ae8c90301f Fixed mask handling in AffineFeature. 2023-05-17 12:04:52 +03:00
Alexander Smorkalov
4eec739624 Build warning fix on Windows for Eigen wrapper. 2023-05-17 10:12:02 +03:00
Yuantao Feng
eefee8574a
dnn: refactor reduce (#23613)
* initial impl

* remove reduce in8; fix reduce importer

* fix bugs and add log sum exp

* remove unnecessary header and fix indentation
2023-05-17 10:03:45 +03:00
Zihao Mu
5229312ad2
Merge pull request #22275 from zihaomu:fp16_support_conv
DNN: FP16 support on Convolution 2D #22275 

## FP16 support on ARM platform
This PR proposes to support FP16 backend in Convolution.
For now, we only support FP16 at ARM aarch64.

In addition to adding fp16, I also added `seperateIm2col` optimization in this patch.

## How to use FP16 to speed up convolution?
```
Net net = readNet(modelPath);
net.setPreferableTarget(DNN_TARGET_CPU_FP16);
net.setInput(blob);
Mat output = net.forward();
```

### TODO List
| Task | Status | Remarks |
|:-------:|:--------:|:------------:|
| Convolution 2D FP16 | ✔️ | Done |
| Winograd FP16 | Because the current modification has reached 2k lines, winograd fp16 will be completed in the next PR. |  |
| Accuracy Test | ✔️ | Done |
| Performance Test | ✔️ | Done |
| Compiler bug | ✔️ | Done |

### Speed Test for FP 16.

**Test on M1 chip, 4 threads.**

| Model Name | FP32 (Conv+Wino) | Conv(FP16) + Wino(FP 32) |
|:-------:|:--------:|:------------:|
| ReseNet 50 | 26.0 ms | **18.05 ms** (25% speed up)|
| MobileNet V2 | 4.17 ms | **3.09 ms (29% speed up)** |

### Speed Test for `seperateIm2col` trick on X86.
**Test on AMD 5600x, 12 threads.**
| Model Name | 4.x | Patch |
|:-------:|:--------:|:------------:|
| MobileNet V2 | 5.6 ms | **3.0 ms (46% speed up)** |

### Performance Test

#### Performance Test of X86 platform: AMD 5600X, with `-perf_threas=1`
|Name of Test|4.x|patch|patch vs 4.x (x-factor)|
|---|:-:|:-:|:-:|
|Name of Test|4.x 0|fp16pr final|fp16pr final vs 4.x 0 (x-factor)|
|---|:-:|:-:|:-:|
|conv1d::Conv1D::(GFLOPS=0.000, K=[3], IN={1, 2, 19}, OCN=2, G=2, S=2, P=(1, 1), BIAS, OCV/CPU)|0.001|0.001|1.00|
|conv1d::Conv1D::(GFLOPS=0.000, K=[3], IN={1, 2, 25}, OCN=2, G=2, P=(2, 2), PM=SAME, OCV/CPU)|0.001|0.001|1.03|
|conv1d::Conv1D::(GFLOPS=0.000, K=[3], IN={1, 6, 10}, OCN=6, PM=VALID, BIAS, OCV/CPU)|0.001|0.001|0.92|
|conv3d::Conv3D::(GFLOPS=0.000, K=[1 x 1 x 1], IN={1, 4, 9, 10, 10}, OCN=4, S=[1 x 1 x 2], P=(1, 1) x (1, 1) x (1, 1), PM=VALID, OCV/CPU)|0.002|0.003|0.95|
|conv3d::Conv3D::(GFLOPS=0.000, K=[1 x 1 x 1], IN={1, 8, 1, 10, 10}, OCN=8, G=8, P=(1, 1) x (1, 1) x (1, 1), BIAS, OCV/CPU)|0.006|0.006|1.00|
|conv3d::Conv3D::(GFLOPS=0.000, K=[3 x 3 x 3], IN={1, 2, 19, 19, 19}, OCN=2, G=2, S=[2 x 2 x 2], P=(1, 1) x (1, 1) x (1, 1), BIAS, OCV/CPU)|0.045|0.033|1.39|
|conv3d::Conv3D::(GFLOPS=0.000, K=[3 x 4 x 2], IN={1, 4, 8, 10, 10}, OCN=4, G=4, S=[1 x 2 x 1], BIAS, OCV/CPU)|0.011|0.009|1.17|
|conv3d::Conv3D::(GFLOPS=0.001, K=[3 x 3 x 3], IN={1, 2, 25, 19, 19}, OCN=2, G=2, S=[1 x 2 x 2], P=(2, 2) x (2, 2) x (2, 2), PM=SAME, OCV/CPU)|0.109|0.078|1.39|
|conv3d::Conv3D::(GFLOPS=0.002, K=[3 x 1 x 4], IN={1, 14, 5, 10, 10}, OCN=14, PM=SAME, OCV/CPU)|0.040|0.042|0.94|
|conv3d::Conv3D::(GFLOPS=0.006, K=[5 x 5 x 5], IN={1, 4, 50, 19, 19}, OCN=4, S=[2 x 2 x 2], P=(1, 1) x (1, 1) x (1, 1), PM=VALID, OCV/CPU)|0.326|0.342|0.95|
|conv3d::Conv3D::(GFLOPS=0.027, K=[3 x 3 x 3], IN={1, 6, 10, 38, 50}, OCN=6, PM=VALID, BIAS, OCV/CPU)|0.580|0.589|0.99|
|conv3d::Conv3D::(GFLOPS=0.030, K=[5 x 5 x 5], IN={1, 6, 19, 19, 19}, OCN=6, G=2, OCV/CPU)|1.293|1.382|0.94|
|conv3d::Conv3D::(GFLOPS=0.045, K=[7 x 7 x 7], IN={1, 2, 38, 38, 38}, OCN=2, S=[1 x 2 x 1], OCV/CPU)|3.590|3.710|0.97|
|conv3d::Conv3D::(GFLOPS=0.053, K=[3 x 3 x 3], IN={1, 10, 98, 10, 10}, OCN=10, PM=SAME, OCV/CPU)|1.120|1.191|0.94|
|conv3d::Conv3D::(GFLOPS=0.071, K=[7 x 7 x 7], IN={1, 6, 15, 19, 19}, OCN=6, S=[2 x 1 x 1], P=(3, 3) x (3, 3) x (3, 3), PM=SAME, BIAS, OCV/CPU)|2.576|2.872|0.90|
|conv3d::Conv3D::(GFLOPS=0.093, K=[5 x 5 x 5], IN={1, 4, 40, 75, 75}, OCN=4, S=[2 x 2 x 2], OCV/CPU)|4.599|4.670|0.98|
|conv3d::Conv3D::(GFLOPS=0.116, K=[5 x 5 x 5], IN={1, 2, 21, 75, 100}, OCN=2, BIAS, OCV/CPU)|9.230|9.582|0.96|
|conv3d::Conv3D::(GFLOPS=1.267, K=[5 x 5 x 5], IN={1, 3, 75, 75, 100}, OCN=3, PM=SAME, BIAS, OCV/CPU)|65.946|69.381|0.95|
|conv3d::Conv3D::(GFLOPS=1.343, K=[3 x 3 x 3], IN={1, 11, 9, 150, 200}, OCN=11, PM=VALID, BIAS, OCV/CPU)|18.915|19.289|0.98|
|conv::Conv::(GFLOPS=0.177, K=[1 x 1], IN={1, 512, 26, 26}, OCN=256, OCV/CPU)|1.404|1.457|0.96|
|conv::Conv::(GFLOPS=0.177, K=[1 x 1], IN={1, 1024, 13, 13}, OCN=512, OCV/CPU)|2.060|1.501|1.37|
|conv::Conv::(GFLOPS=0.178, K=[1 x 1], IN={1, 256, 52, 52}, OCN=128, OCV/CPU)|1.409|1.464|0.96|
|conv::Conv::(GFLOPS=0.210, K=[1 x 1], IN={1, 576, 38, 50}, OCN=96, PM=SAME, BIAS, OCV/CPU)|1.793|1.838|0.98|
|conv::Conv::(GFLOPS=0.231, K=[3 x 3], IN={1, 128, 56, 56}, OCN=32, P=[1 x 1], OCV/CPU)|1.207|1.199|1.01|
|conv::Conv::(GFLOPS=0.231, K=[3 x 3], IN={1, 256, 14, 14}, OCN=256, P=[1 x 1], OCV/CPU)|1.277|1.275|1.00|
|conv::Conv::(GFLOPS=0.280, K=[1 x 1], IN={1, 576, 38, 50}, OCN=128, PM=SAME, BIAS, OCV/CPU)|2.319|2.370|0.98|
|conv::Conv::(GFLOPS=0.302, K=[3 x 3], IN={1, 64, 64, 64}, OCN=64, PM=SAME, OCV/CPU)|1.351|1.346|1.00|
|conv::Conv::(GFLOPS=0.357, K=[1 x 1], IN={1, 64, 208, 208}, OCN=64, OCV/CPU)|3.520|3.612|0.97|
|conv::Conv::(GFLOPS=0.420, K=[3 x 3], IN={1, 96, 38, 50}, OCN=128, PM=SAME, BIAS, OCV/CPU)|1.876|1.880|1.00|
|conv::Conv::(GFLOPS=0.472, K=[3 x 3], IN={1, 128, 40, 40}, OCN=128, PM=SAME, OCV/CPU)|1.981|1.995|0.99|
|conv::Conv::(GFLOPS=0.472, K=[3 x 3], IN={1, 256, 20, 20}, OCN=256, PM=SAME, OCV/CPU)|2.620|2.627|1.00|
|conv::Conv::(GFLOPS=0.472, K=[3 x 3], IN={1, 512, 10, 10}, OCN=512, PM=SAME, OCV/CPU)|4.202|4.123|1.02|
|conv::Conv::(GFLOPS=0.561, K=[3 x 3], IN={1, 128, 38, 50}, OCN=128, PM=SAME, BIAS, OCV/CPU)|2.429|2.445|0.99|
|conv::Conv::(GFLOPS=0.624, K=[3 x 3], IN={1, 128, 46, 46}, OCN=128, P=[1 x 1], BIAS, OCV/CPU)|2.591|2.576|1.01|
|conv::Conv::(GFLOPS=0.701, K=[3 x 3], IN={1, 128, 38, 50}, OCN=160, PM=SAME, BIAS, OCV/CPU)|3.005|2.998|1.00|
|conv::Conv::(GFLOPS=0.798, K=[3 x 3], IN={1, 64, 104, 104}, OCN=64, P=[1 x 1], OCV/CPU)|3.515|3.532|1.00|
|conv::Conv::(GFLOPS=0.798, K=[3 x 3], IN={1, 128, 52, 52}, OCN=128, P=[1 x 1], OCV/CPU)|3.115|3.134|0.99|
|conv::Conv::(GFLOPS=0.798, K=[3 x 3], IN={1, 256, 26, 26}, OCN=256, P=[1 x 1], OCV/CPU)|3.937|3.899|1.01|
|conv::Conv::(GFLOPS=0.798, K=[3 x 3], IN={1, 512, 13, 13}, OCN=512, P=[1 x 1], OCV/CPU)|5.533|5.471|1.01|
|conv::Conv::(GFLOPS=0.830, K=[3 x 3], IN={1, 64, 75, 100}, OCN=96, PM=SAME, BIAS, OCV/CPU)|3.472|3.464|1.00|
|conv::Conv::(GFLOPS=0.958, K=[3 x 3], IN={1, 192, 38, 38}, OCN=192, PM=SAME, OCV/CPU)|4.302|4.322|1.00|
|conv::Conv::(GFLOPS=0.958, K=[3 x 3], IN={1, 384, 19, 19}, OCN=384, PM=SAME, OCV/CPU)|6.100|6.035|1.01|
|conv::Conv::(GFLOPS=1.022, K=[3 x 3], IN={1, 576, 19, 19}, OCN=273, PM=SAME, BIAS, OCV/CPU)|6.580|6.484|1.01|
|conv::Conv::(GFLOPS=1.112, K=[3 x 3], IN={1, 512, 10, 10}, OCN=1206, P=[1 x 1], BIAS, OCV/CPU)|9.741|9.634|1.01|
|conv::Conv::(GFLOPS=1.181, K=[3 x 3], IN={1, 64, 160, 200}, OCN=128, S=[2 x 2], P=[1 x 1], BIAS, OCV/CPU)|10.131|10.156|1.00|
|conv::Conv::(GFLOPS=1.182, K=[3 x 3], IN={1, 32, 320, 400}, OCN=64, S=[2 x 2], P=[1 x 1], BIAS, OCV/CPU)|12.391|12.350|1.00|
|conv::Conv::(GFLOPS=1.195, K=[9 x 9], IN={1, 32, 240, 320}, OCN=3, P=[4 x 4], BIAS, OCV/CPU)|91.074|87.893|1.04|
|conv::Conv::(GFLOPS=1.196, K=[3 x 3], IN={1, 384, 26, 26}, OCN=256, P=[1 x 1], OCV/CPU)|5.903|5.903|1.00|
|conv::Conv::(GFLOPS=1.210, K=[3 x 3], IN={1, 32, 256, 256}, OCN=32, PM=SAME, OCV/CPU)|6.890|6.794|1.01|
|conv::Conv::(GFLOPS=1.245, K=[3 x 3], IN={1, 64, 75, 75}, OCN=192, PM=SAME, BIAS, OCV/CPU)|5.160|5.131|1.01|
|conv::Conv::(GFLOPS=1.245, K=[3 x 3], IN={1, 96, 75, 100}, OCN=96, PM=SAME, BIAS, OCV/CPU)|4.970|5.036|0.99|
|conv::Conv::(GFLOPS=1.248, K=[3 x 3], IN={1, 256, 46, 46}, OCN=128, P=[1 x 1], BIAS, OCV/CPU)|5.045|5.015|1.01|
|conv::Conv::(GFLOPS=1.258, K=[3 x 3], IN={1, 1280, 10, 10}, OCN=546, PM=SAME, BIAS, OCV/CPU)|11.583|11.343|1.02|
|conv::Conv::(GFLOPS=1.261, K=[3 x 3], IN={1, 192, 38, 50}, OCN=192, PM=SAME, BIAS, OCV/CPU)|5.348|5.320|1.01|
|conv::Conv::(GFLOPS=1.416, K=[3 x 3], IN={1, 128, 62, 82}, OCN=128, BIAS, OCV/CPU)|5.357|5.396|0.99|
|conv::Conv::(GFLOPS=1.500, K=[3 x 3], IN={1, 128, 64, 84}, OCN=128, BIAS, OCV/CPU)|6.050|6.006|1.01|
|conv::Conv::(GFLOPS=1.586, K=[3 x 3], IN={1, 128, 66, 86}, OCN=128, BIAS, OCV/CPU)|5.952|5.953|1.00|
|conv::Conv::(GFLOPS=1.595, K=[3 x 3], IN={1, 256, 26, 26}, OCN=512, P=[1 x 1], OCV/CPU)|8.014|8.014|1.00|
|conv::Conv::(GFLOPS=1.595, K=[3 x 3], IN={1, 256, 52, 52}, OCN=512, S=[2 x 2], P=[1 x 1], OCV/CPU)|12.472|12.577|0.99|
|conv::Conv::(GFLOPS=1.595, K=[3 x 3], IN={1, 512, 13, 13}, OCN=1024, P=[1 x 1], OCV/CPU)|10.803|10.655|1.01|
|conv::Conv::(GFLOPS=1.595, K=[3 x 3], IN={1, 512, 26, 26}, OCN=1024, S=[2 x 2], P=[1 x 1], OCV/CPU)|18.429|13.405|1.37|
|conv::Conv::(GFLOPS=1.596, K=[3 x 3], IN={1, 64, 104, 104}, OCN=128, P=[1 x 1], OCV/CPU)|6.659|6.647|1.00|
|conv::Conv::(GFLOPS=1.596, K=[3 x 3], IN={1, 64, 208, 208}, OCN=128, S=[2 x 2], P=[1 x 1], OCV/CPU)|14.192|13.819|1.03|
|conv::Conv::(GFLOPS=1.596, K=[3 x 3], IN={1, 128, 52, 52}, OCN=256, P=[1 x 1], OCV/CPU)|6.045|6.068|1.00|
|conv::Conv::(GFLOPS=1.596, K=[3 x 3], IN={1, 128, 104, 104}, OCN=256, S=[2 x 2], P=[1 x 1], OCV/CPU)|12.742|12.828|0.99|
|conv::Conv::(GFLOPS=1.598, K=[3 x 3], IN={1, 32, 208, 208}, OCN=64, P=[1 x 1], OCV/CPU)|8.046|7.773|1.04|
|conv::Conv::(GFLOPS=1.598, K=[3 x 3], IN={1, 32, 416, 416}, OCN=64, S=[2 x 2], P=[1 x 1], OCV/CPU)|17.440|17.192|1.01|
|conv::Conv::(GFLOPS=1.659, K=[3 x 3], IN={1, 960, 10, 10}, OCN=960, PM=SAME, OCV/CPU)|15.418|14.972|1.03|
|conv::Conv::(GFLOPS=1.660, K=[3 x 3], IN={1, 128, 75, 75}, OCN=128, G=128, P=[1 x 1], BIAS, OCV/CPU)|0.430|0.430|1.00|
|conv::Conv::(GFLOPS=1.660, K=[3 x 3], IN={1, 128, 75, 75}, OCN=128, PM=SAME, OCV/CPU)|6.692|6.663|1.00|
|conv::Conv::(GFLOPS=1.675, K=[3 x 3], IN={1, 128, 68, 88}, OCN=128, BIAS, OCV/CPU)|6.350|6.347|1.00|
|conv::Conv::(GFLOPS=1.704, K=[3 x 3], IN={1, 256, 38, 38}, OCN=256, G=256, P=[1 x 1], BIAS, OCV/CPU)|0.267|0.265|1.01|
|conv::Conv::(GFLOPS=1.704, K=[3 x 3], IN={1, 256, 38, 38}, OCN=256, PM=SAME, OCV/CPU)|7.755|7.558|1.03|
|conv::Conv::(GFLOPS=1.704, K=[3 x 3], IN={1, 512, 19, 19}, OCN=512, G=512, P=[1 x 1], BIAS, OCV/CPU)|0.203|0.202|1.00|
|conv::Conv::(GFLOPS=1.704, K=[3 x 3], IN={1, 512, 19, 19}, OCN=512, P=[1 x 1], BIAS, OCV/CPU)|10.663|10.576|1.01|
|conv::Conv::(GFLOPS=1.704, K=[3 x 3], IN={1, 512, 19, 19}, OCN=512, PM=SAME, OCV/CPU)|10.827|10.614|1.02|
|conv::Conv::(GFLOPS=1.766, K=[3 x 3], IN={1, 128, 70, 90}, OCN=128, BIAS, OCV/CPU)|7.049|6.947|1.01|
|conv::Conv::(GFLOPS=1.859, K=[3 x 3], IN={1, 128, 72, 92}, OCN=128, BIAS, OCV/CPU)|6.900|6.901|1.00|
|conv::Conv::(GFLOPS=1.888, K=[3 x 3], IN={1, 1024, 10, 10}, OCN=1024, G=1024, P=[1 x 1], BIAS, OCV/CPU)|0.165|0.165|1.00|
|conv::Conv::(GFLOPS=1.888, K=[3 x 3], IN={1, 1024, 10, 10}, OCN=1024, PM=SAME, OCV/CPU)|17.953|17.251|1.04|
|conv::Conv::(GFLOPS=1.954, K=[3 x 3], IN={1, 128, 74, 94}, OCN=128, BIAS, OCV/CPU)|7.430|7.320|1.01|
|conv::Conv::(GFLOPS=1.995, K=[9 x 9], IN={1, 3, 320, 400}, OCN=32, P=[4 x 4], BIAS, OCV/CPU)|22.187|21.705|1.02|
|conv::Conv::(GFLOPS=2.052, K=[3 x 3], IN={1, 128, 76, 96}, OCN=128, BIAS, OCV/CPU)|8.349|8.126|1.03|
|conv::Conv::(GFLOPS=2.100, K=[3 x 3], IN={1, 144, 75, 75}, OCN=144, PM=SAME, OCV/CPU)|8.273|8.297|1.00|
|conv::Conv::(GFLOPS=2.153, K=[3 x 3], IN={1, 128, 78, 98}, OCN=128, BIAS, OCV/CPU)|8.169|8.094|1.01|
|conv::Conv::(GFLOPS=2.156, K=[3 x 3], IN={1, 576, 19, 19}, OCN=576, PM=SAME, OCV/CPU)|13.602|13.359|1.02|
|conv::Conv::(GFLOPS=2.255, K=[3 x 3], IN={1, 128, 80, 100}, OCN=128, BIAS, OCV/CPU)|8.633|8.584|1.01|
|conv::Conv::(GFLOPS=2.719, K=[3 x 3], IN={1, 96, 256, 256}, OCN=96, S=[2 x 2], PM=SAME, OCV/CPU)|29.339|28.897|1.02|
|conv::Conv::(GFLOPS=3.319, K=[3 x 3], IN={1, 128, 75, 75}, OCN=256, P=[1 x 1], BIAS, OCV/CPU)|13.000|12.920|1.01|
|conv::Conv::(GFLOPS=3.321, K=[3 x 3], IN={1, 64, 150, 150}, OCN=128, P=[1 x 1], BIAS, OCV/CPU)|14.262|13.319|1.07|
|conv::Conv::(GFLOPS=3.398, K=[7 x 7], IN={1, 128, 46, 46}, OCN=128, P=[3 x 3], BIAS, OCV/CPU)|27.453|27.253|1.01|
|conv::Conv::(GFLOPS=3.407, K=[3 x 3], IN={1, 512, 19, 19}, OCN=1024, D=[6 x 6], P=[6 x 6], BIAS, OCV/CPU)|32.052|27.269|1.18|
|conv::Conv::(GFLOPS=3.408, K=[3 x 3], IN={1, 256, 38, 38}, OCN=512, P=[1 x 1], BIAS, OCV/CPU)|15.363|15.208|1.01|
|conv::Conv::(GFLOPS=4.247, K=[3 x 3], IN={1, 480, 32, 32}, OCN=480, PM=SAME, OCV/CPU)|18.543|18.434|1.01|
|conv::Conv::(GFLOPS=4.247, K=[5 x 5], IN={1, 144, 128, 128}, OCN=144, S=[2 x 2], PM=SAME, OCV/CPU)|39.114|37.954|1.03|
|conv::Conv::(GFLOPS=4.566, K=[7 x 7], IN={1, 172, 46, 46}, OCN=128, P=[3 x 3], BIAS, OCV/CPU)|36.271|36.972|0.98|
|conv::Conv::(GFLOPS=4.993, K=[3 x 3], IN={1, 256, 46, 46}, OCN=512, P=[1 x 1], BIAS, OCV/CPU)|19.262|19.427|0.99|
|conv::Conv::(GFLOPS=4.993, K=[3 x 3], IN={1, 512, 46, 46}, OCN=256, P=[1 x 1], BIAS, OCV/CPU)|19.298|19.349|1.00|
|conv::Conv::(GFLOPS=4.994, K=[3 x 3], IN={1, 128, 92, 92}, OCN=256, P=[1 x 1], BIAS, OCV/CPU)|20.261|19.847|1.02|
|conv::Conv::(GFLOPS=4.997, K=[3 x 3], IN={1, 64, 184, 184}, OCN=128, P=[1 x 1], BIAS, OCV/CPU)|21.867|21.525|1.02|
|conv::Conv::(GFLOPS=5.780, K=[5 x 5], IN={1, 672, 32, 32}, OCN=672, S=[2 x 2], PM=SAME, OCV/CPU)|51.756|49.979|1.04|
|conv::Conv::(GFLOPS=6.116, K=[3 x 3], IN={1, 1152, 16, 16}, OCN=1152, PM=SAME, OCV/CPU)|28.133|27.060|1.04|
|conv::Conv::(GFLOPS=6.118, K=[3 x 3], IN={1, 144, 128, 128}, OCN=144, PM=SAME, OCV/CPU)|25.035|24.980|1.00|
|conv::Conv::(GFLOPS=6.637, K=[3 x 3], IN={1, 256, 75, 75}, OCN=256, P=[1 x 1], BIAS, OCV/CPU)|25.858|25.821|1.00|
|conv::Conv::(GFLOPS=6.638, K=[3 x 3], IN={1, 128, 150, 150}, OCN=128, P=[1 x 1], BIAS, OCV/CPU)|27.313|27.149|1.01|
|conv::Conv::(GFLOPS=6.641, K=[3 x 3], IN={1, 64, 150, 200}, OCN=192, PM=SAME, BIAS, OCV/CPU)|28.219|28.111|1.00|
|conv::Conv::(GFLOPS=6.641, K=[3 x 3], IN={1, 64, 300, 300}, OCN=64, P=[1 x 1], BIAS, OCV/CPU)|46.025|46.674|0.99|
|conv::Conv::(GFLOPS=6.814, K=[3 x 3], IN={1, 512, 38, 38}, OCN=512, P=[1 x 1], BIAS, OCV/CPU)|30.220|29.446|1.03|
|conv::Conv::(GFLOPS=8.025, K=[3 x 3], IN={1, 1024, 19, 19}, OCN=1206, P=[1 x 1], BIAS, OCV/CPU)|49.410|48.708|1.01|
|conv::Conv::(GFLOPS=9.986, K=[3 x 3], IN={1, 512, 46, 46}, OCN=512, P=[1 x 1], BIAS, OCV/CPU)|38.203|38.001|1.01|
|conv::Conv::(GFLOPS=9.987, K=[3 x 3], IN={1, 256, 92, 92}, OCN=256, P=[1 x 1], BIAS, OCV/CPU)|39.961|39.021|1.02|
|conv::Conv::(GFLOPS=9.989, K=[3 x 3], IN={1, 128, 184, 184}, OCN=128, P=[1 x 1], BIAS, OCV/CPU)|48.685|47.075|1.03|
|conv::Conv::(GFLOPS=9.993, K=[3 x 3], IN={1, 64, 368, 368}, OCN=64, P=[1 x 1], BIAS, OCV/CPU)|75.114|72.586|1.03|
|conv::Conv::(GFLOPS=10.087, K=[3 x 3], IN={1, 576, 38, 50}, OCN=512, PM=SAME, BIAS, OCV/CPU)|41.222|41.144|1.00|
|conv::Conv::(GFLOPS=10.701, K=[3 x 3], IN={1, 512, 38, 38}, OCN=804, P=[1 x 1], BIAS, OCV/CPU)|46.220|46.353|1.00|
|conv::Conv::(GFLOPS=11.797, K=[5 x 5], IN={1, 240, 64, 64}, OCN=240, PM=SAME, OCV/CPU)|98.201|98.771|0.99|
|conv::Conv::(GFLOPS=11.797, K=[5 x 5], IN={1, 480, 32, 32}, OCN=480, PM=SAME, OCV/CPU)|100.106|96.971|1.03|
|conv::Conv::(GFLOPS=16.987, K=[5 x 5], IN={1, 1152, 16, 16}, OCN=1152, PM=SAME, OCV/CPU)|146.977|140.445|1.05|
|conv::Conv::(GFLOPS=23.122, K=[5 x 5], IN={1, 672, 32, 32}, OCN=672, PM=SAME, OCV/CPU)|198.618|194.665|1.02|


#### Performance Test of ARM platform: apple M1, with `-perf_threas=1`

Min (ms)

|Name of Test|4.x|patch|4.x vs patch (x-factor)|
|---|:-:|:-:|:-:|
|conv1d::Conv1D::(GFLOPS=0.000, K=[3], IN={1, 2, 19}, OCN=2, G=2, S=2, P=(1, 1), BIAS, OCV/CPU)|0.001|0.001|1.07|
|conv1d::Conv1D::(GFLOPS=0.000, K=[3], IN={1, 2, 25}, OCN=2, G=2, P=(2, 2), PM=SAME, OCV/CPU)|0.001|0.001|1.10|
|conv1d::Conv1D::(GFLOPS=0.000, K=[3], IN={1, 6, 10}, OCN=6, PM=VALID, BIAS, OCV/CPU)|0.002|0.002|0.97|
|conv3d::Conv3D::(GFLOPS=0.000, K=[1 x 1 x 1], IN={1, 4, 9, 10, 10}, OCN=4, S=[1 x 1 x 2], P=(1, 1) x (1, 1) x (1, 1), PM=VALID, OCV/CPU)|0.003|0.003|0.84|
|conv3d::Conv3D::(GFLOPS=0.000, K=[1 x 1 x 1], IN={1, 8, 1, 10, 10}, OCN=8, G=8, P=(1, 1) x (1, 1) x (1, 1), BIAS, OCV/CPU)|0.009|0.009|1.00|
|conv3d::Conv3D::(GFLOPS=0.000, K=[3 x 3 x 3], IN={1, 2, 19, 19, 19}, OCN=2, G=2, S=[2 x 2 x 2], P=(1, 1) x (1, 1) x (1, 1), BIAS, OCV/CPU)|0.027|0.030|0.90|
|conv3d::Conv3D::(GFLOPS=0.000, K=[3 x 4 x 2], IN={1, 4, 8, 10, 10}, OCN=4, G=4, S=[1 x 2 x 1], BIAS, OCV/CPU)|0.008|0.007|1.07|
|conv3d::Conv3D::(GFLOPS=0.001, K=[3 x 3 x 3], IN={1, 2, 25, 19, 19}, OCN=2, G=2, S=[1 x 2 x 2], P=(2, 2) x (2, 2) x (2, 2), PM=SAME, OCV/CPU)|0.066|0.072|0.91|
|conv3d::Conv3D::(GFLOPS=0.002, K=[3 x 1 x 4], IN={1, 14, 5, 10, 10}, OCN=14, PM=SAME, OCV/CPU)|0.090|0.054|1.68|
|conv3d::Conv3D::(GFLOPS=0.006, K=[5 x 5 x 5], IN={1, 4, 50, 19, 19}, OCN=4, S=[2 x 2 x 2], P=(1, 1) x (1, 1) x (1, 1), PM=VALID, OCV/CPU)|0.328|0.409|0.80|
|conv3d::Conv3D::(GFLOPS=0.027, K=[3 x 3 x 3], IN={1, 6, 10, 38, 50}, OCN=6, PM=VALID, BIAS, OCV/CPU)|0.659|0.697|0.95|
|conv3d::Conv3D::(GFLOPS=0.030, K=[5 x 5 x 5], IN={1, 6, 19, 19, 19}, OCN=6, G=2, OCV/CPU)|1.266|1.403|0.90|
|conv3d::Conv3D::(GFLOPS=0.045, K=[7 x 7 x 7], IN={1, 2, 38, 38, 38}, OCN=2, S=[1 x 2 x 1], OCV/CPU)|3.550|4.145|0.86|
|conv3d::Conv3D::(GFLOPS=0.053, K=[3 x 3 x 3], IN={1, 10, 98, 10, 10}, OCN=10, PM=SAME, OCV/CPU)|1.188|1.375|0.86|
|conv3d::Conv3D::(GFLOPS=0.071, K=[7 x 7 x 7], IN={1, 6, 15, 19, 19}, OCN=6, S=[2 x 1 x 1], P=(3, 3) x (3, 3) x (3, 3), PM=SAME, BIAS, OCV/CPU)|2.683|3.236|0.83|
|conv3d::Conv3D::(GFLOPS=0.093, K=[5 x 5 x 5], IN={1, 4, 40, 75, 75}, OCN=4, S=[2 x 2 x 2], OCV/CPU)|4.491|5.501|0.82|
|conv3d::Conv3D::(GFLOPS=0.116, K=[5 x 5 x 5], IN={1, 2, 21, 75, 100}, OCN=2, BIAS, OCV/CPU)|8.916|10.181|0.88|
|conv3d::Conv3D::(GFLOPS=1.267, K=[5 x 5 x 5], IN={1, 3, 75, 75, 100}, OCN=3, PM=SAME, BIAS, OCV/CPU)|69.995|72.296|0.97|
|conv3d::Conv3D::(GFLOPS=1.343, K=[3 x 3 x 3], IN={1, 11, 9, 150, 200}, OCN=11, PM=VALID, BIAS, OCV/CPU)|22.531|23.139|0.97|
|conv::Conv::(GFLOPS=0.177, K=[1 x 1], IN={1, 512, 26, 26}, OCN=256, OCV/CPU)|2.239|1.933|1.16|
|conv::Conv::(GFLOPS=0.177, K=[1 x 1], IN={1, 512, 26, 26}, OCN=256, OCV/CPU_FP16)|-|1.010|-|
|conv::Conv::(GFLOPS=0.177, K=[1 x 1], IN={1, 1024, 13, 13}, OCN=512, OCV/CPU)|3.134|2.068|1.52|
|conv::Conv::(GFLOPS=0.177, K=[1 x 1], IN={1, 1024, 13, 13}, OCN=512, OCV/CPU_FP16)|-|1.062|-|
|conv::Conv::(GFLOPS=0.178, K=[1 x 1], IN={1, 256, 52, 52}, OCN=128, OCV/CPU)|1.918|1.920|1.00|
|conv::Conv::(GFLOPS=0.178, K=[1 x 1], IN={1, 256, 52, 52}, OCN=128, OCV/CPU_FP16)|-|1.014|-|
|conv::Conv::(GFLOPS=0.210, K=[1 x 1], IN={1, 576, 38, 50}, OCN=96, PM=SAME, BIAS, OCV/CPU)|2.340|2.352|0.99|
|conv::Conv::(GFLOPS=0.210, K=[1 x 1], IN={1, 576, 38, 50}, OCN=96, PM=SAME, BIAS, OCV/CPU_FP16)|-|1.247|-|
|conv::Conv::(GFLOPS=0.231, K=[3 x 3], IN={1, 128, 56, 56}, OCN=32, P=[1 x 1], OCV/CPU)|1.116|1.111|1.00|
|conv::Conv::(GFLOPS=0.231, K=[3 x 3], IN={1, 128, 56, 56}, OCN=32, P=[1 x 1], OCV/CPU_FP16)|-|1.114|-|
|conv::Conv::(GFLOPS=0.231, K=[3 x 3], IN={1, 256, 14, 14}, OCN=256, P=[1 x 1], OCV/CPU)|1.116|1.112|1.00|
|conv::Conv::(GFLOPS=0.231, K=[3 x 3], IN={1, 256, 14, 14}, OCN=256, P=[1 x 1], OCV/CPU_FP16)|-|1.113|-|
|conv::Conv::(GFLOPS=0.280, K=[1 x 1], IN={1, 576, 38, 50}, OCN=128, PM=SAME, BIAS, OCV/CPU)|3.067|3.085|0.99|
|conv::Conv::(GFLOPS=0.280, K=[1 x 1], IN={1, 576, 38, 50}, OCN=128, PM=SAME, BIAS, OCV/CPU_FP16)|-|1.622|-|
|conv::Conv::(GFLOPS=0.302, K=[3 x 3], IN={1, 64, 64, 64}, OCN=64, PM=SAME, OCV/CPU)|1.153|1.187|0.97|
|conv::Conv::(GFLOPS=0.302, K=[3 x 3], IN={1, 64, 64, 64}, OCN=64, PM=SAME, OCV/CPU_FP16)|-|1.150|-|
|conv::Conv::(GFLOPS=0.357, K=[1 x 1], IN={1, 64, 208, 208}, OCN=64, OCV/CPU)|4.804|4.849|0.99|
|conv::Conv::(GFLOPS=0.357, K=[1 x 1], IN={1, 64, 208, 208}, OCN=64, OCV/CPU_FP16)|-|2.922|-|
|conv::Conv::(GFLOPS=0.420, K=[3 x 3], IN={1, 96, 38, 50}, OCN=128, PM=SAME, BIAS, OCV/CPU)|1.463|1.469|1.00|
|conv::Conv::(GFLOPS=0.420, K=[3 x 3], IN={1, 96, 38, 50}, OCN=128, PM=SAME, BIAS, OCV/CPU_FP16)|-|1.459|-|
|conv::Conv::(GFLOPS=0.472, K=[3 x 3], IN={1, 128, 40, 40}, OCN=128, PM=SAME, OCV/CPU)|1.577|1.580|1.00|
|conv::Conv::(GFLOPS=0.472, K=[3 x 3], IN={1, 128, 40, 40}, OCN=128, PM=SAME, OCV/CPU_FP16)|-|1.580|-|
|conv::Conv::(GFLOPS=0.472, K=[3 x 3], IN={1, 256, 20, 20}, OCN=256, PM=SAME, OCV/CPU)|1.826|1.818|1.00|
|conv::Conv::(GFLOPS=0.472, K=[3 x 3], IN={1, 256, 20, 20}, OCN=256, PM=SAME, OCV/CPU_FP16)|-|1.817|-|
|conv::Conv::(GFLOPS=0.472, K=[3 x 3], IN={1, 512, 10, 10}, OCN=512, PM=SAME, OCV/CPU)|6.541|5.081|1.29|
|conv::Conv::(GFLOPS=0.472, K=[3 x 3], IN={1, 512, 10, 10}, OCN=512, PM=SAME, OCV/CPU_FP16)|-|2.809|-|
|conv::Conv::(GFLOPS=0.561, K=[3 x 3], IN={1, 128, 38, 50}, OCN=128, PM=SAME, BIAS, OCV/CPU)|1.912|1.919|1.00|
|conv::Conv::(GFLOPS=0.561, K=[3 x 3], IN={1, 128, 38, 50}, OCN=128, PM=SAME, BIAS, OCV/CPU_FP16)|-|1.919|-|
|conv::Conv::(GFLOPS=0.624, K=[3 x 3], IN={1, 128, 46, 46}, OCN=128, P=[1 x 1], BIAS, OCV/CPU)|1.961|1.971|0.99|
|conv::Conv::(GFLOPS=0.624, K=[3 x 3], IN={1, 128, 46, 46}, OCN=128, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|1.961|-|
|conv::Conv::(GFLOPS=0.701, K=[3 x 3], IN={1, 128, 38, 50}, OCN=160, PM=SAME, BIAS, OCV/CPU)|2.317|2.329|0.99|
|conv::Conv::(GFLOPS=0.701, K=[3 x 3], IN={1, 128, 38, 50}, OCN=160, PM=SAME, BIAS, OCV/CPU_FP16)|-|2.322|-|
|conv::Conv::(GFLOPS=0.798, K=[3 x 3], IN={1, 64, 104, 104}, OCN=64, P=[1 x 1], OCV/CPU)|2.920|2.947|0.99|
|conv::Conv::(GFLOPS=0.798, K=[3 x 3], IN={1, 64, 104, 104}, OCN=64, P=[1 x 1], OCV/CPU_FP16)|-|2.924|-|
|conv::Conv::(GFLOPS=0.798, K=[3 x 3], IN={1, 128, 52, 52}, OCN=128, P=[1 x 1], OCV/CPU)|2.467|2.466|1.00|
|conv::Conv::(GFLOPS=0.798, K=[3 x 3], IN={1, 128, 52, 52}, OCN=128, P=[1 x 1], OCV/CPU_FP16)|-|2.496|-|
|conv::Conv::(GFLOPS=0.798, K=[3 x 3], IN={1, 256, 26, 26}, OCN=256, P=[1 x 1], OCV/CPU)|3.028|2.997|1.01|
|conv::Conv::(GFLOPS=0.798, K=[3 x 3], IN={1, 256, 26, 26}, OCN=256, P=[1 x 1], OCV/CPU_FP16)|-|2.986|-|
|conv::Conv::(GFLOPS=0.798, K=[3 x 3], IN={1, 512, 13, 13}, OCN=512, P=[1 x 1], OCV/CPU)|4.353|4.355|1.00|
|conv::Conv::(GFLOPS=0.798, K=[3 x 3], IN={1, 512, 13, 13}, OCN=512, P=[1 x 1], OCV/CPU_FP16)|-|4.355|-|
|conv::Conv::(GFLOPS=0.830, K=[3 x 3], IN={1, 64, 75, 100}, OCN=96, PM=SAME, BIAS, OCV/CPU)|2.762|2.793|0.99|
|conv::Conv::(GFLOPS=0.830, K=[3 x 3], IN={1, 64, 75, 100}, OCN=96, PM=SAME, BIAS, OCV/CPU_FP16)|-|2.797|-|
|conv::Conv::(GFLOPS=0.958, K=[3 x 3], IN={1, 192, 38, 38}, OCN=192, PM=SAME, OCV/CPU)|3.428|3.226|1.06|
|conv::Conv::(GFLOPS=0.958, K=[3 x 3], IN={1, 192, 38, 38}, OCN=192, PM=SAME, OCV/CPU_FP16)|-|3.223|-|
|conv::Conv::(GFLOPS=0.958, K=[3 x 3], IN={1, 384, 19, 19}, OCN=384, PM=SAME, OCV/CPU)|3.967|3.957|1.00|
|conv::Conv::(GFLOPS=0.958, K=[3 x 3], IN={1, 384, 19, 19}, OCN=384, PM=SAME, OCV/CPU_FP16)|-|3.960|-|
|conv::Conv::(GFLOPS=1.022, K=[3 x 3], IN={1, 576, 19, 19}, OCN=273, PM=SAME, BIAS, OCV/CPU)|4.806|4.387|1.10|
|conv::Conv::(GFLOPS=1.022, K=[3 x 3], IN={1, 576, 19, 19}, OCN=273, PM=SAME, BIAS, OCV/CPU_FP16)|-|4.366|-|
|conv::Conv::(GFLOPS=1.112, K=[3 x 3], IN={1, 512, 10, 10}, OCN=1206, P=[1 x 1], BIAS, OCV/CPU)|14.509|11.756|1.23|
|conv::Conv::(GFLOPS=1.112, K=[3 x 3], IN={1, 512, 10, 10}, OCN=1206, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|6.510|-|
|conv::Conv::(GFLOPS=1.181, K=[3 x 3], IN={1, 64, 160, 200}, OCN=128, S=[2 x 2], P=[1 x 1], BIAS, OCV/CPU)|13.718|13.287|1.03|
|conv::Conv::(GFLOPS=1.181, K=[3 x 3], IN={1, 64, 160, 200}, OCN=128, S=[2 x 2], P=[1 x 1], BIAS, OCV/CPU_FP16)|-|7.190|-|
|conv::Conv::(GFLOPS=1.182, K=[3 x 3], IN={1, 32, 320, 400}, OCN=64, S=[2 x 2], P=[1 x 1], BIAS, OCV/CPU)|15.133|14.853|1.02|
|conv::Conv::(GFLOPS=1.182, K=[3 x 3], IN={1, 32, 320, 400}, OCN=64, S=[2 x 2], P=[1 x 1], BIAS, OCV/CPU_FP16)|-|8.671|-|
|conv::Conv::(GFLOPS=1.195, K=[9 x 9], IN={1, 32, 240, 320}, OCN=3, P=[4 x 4], BIAS, OCV/CPU)|41.928|43.328|0.97|
|conv::Conv::(GFLOPS=1.195, K=[9 x 9], IN={1, 32, 240, 320}, OCN=3, P=[4 x 4], BIAS, OCV/CPU_FP16)|-|38.072|-|
|conv::Conv::(GFLOPS=1.196, K=[3 x 3], IN={1, 384, 26, 26}, OCN=256, P=[1 x 1], OCV/CPU)|4.409|4.428|1.00|
|conv::Conv::(GFLOPS=1.196, K=[3 x 3], IN={1, 384, 26, 26}, OCN=256, P=[1 x 1], OCV/CPU_FP16)|-|4.427|-|
|conv::Conv::(GFLOPS=1.210, K=[3 x 3], IN={1, 32, 256, 256}, OCN=32, PM=SAME, OCV/CPU)|6.144|5.363|1.15|
|conv::Conv::(GFLOPS=1.210, K=[3 x 3], IN={1, 32, 256, 256}, OCN=32, PM=SAME, OCV/CPU_FP16)|-|5.368|-|
|conv::Conv::(GFLOPS=1.245, K=[3 x 3], IN={1, 64, 75, 75}, OCN=192, PM=SAME, BIAS, OCV/CPU)|3.926|3.932|1.00|
|conv::Conv::(GFLOPS=1.245, K=[3 x 3], IN={1, 64, 75, 75}, OCN=192, PM=SAME, BIAS, OCV/CPU_FP16)|-|3.938|-|
|conv::Conv::(GFLOPS=1.245, K=[3 x 3], IN={1, 96, 75, 100}, OCN=96, PM=SAME, BIAS, OCV/CPU)|3.920|3.915|1.00|
|conv::Conv::(GFLOPS=1.245, K=[3 x 3], IN={1, 96, 75, 100}, OCN=96, PM=SAME, BIAS, OCV/CPU_FP16)|-|3.950|-|
|conv::Conv::(GFLOPS=1.248, K=[3 x 3], IN={1, 256, 46, 46}, OCN=128, P=[1 x 1], BIAS, OCV/CPU)|3.767|3.764|1.00|
|conv::Conv::(GFLOPS=1.248, K=[3 x 3], IN={1, 256, 46, 46}, OCN=128, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|3.762|-|
|conv::Conv::(GFLOPS=1.258, K=[3 x 3], IN={1, 1280, 10, 10}, OCN=546, PM=SAME, BIAS, OCV/CPU)|19.959|13.875|1.44|
|conv::Conv::(GFLOPS=1.258, K=[3 x 3], IN={1, 1280, 10, 10}, OCN=546, PM=SAME, BIAS, OCV/CPU_FP16)|-|7.781|-|
|conv::Conv::(GFLOPS=1.261, K=[3 x 3], IN={1, 192, 38, 50}, OCN=192, PM=SAME, BIAS, OCV/CPU)|3.951|3.955|1.00|
|conv::Conv::(GFLOPS=1.261, K=[3 x 3], IN={1, 192, 38, 50}, OCN=192, PM=SAME, BIAS, OCV/CPU_FP16)|-|3.969|-|
|conv::Conv::(GFLOPS=1.416, K=[3 x 3], IN={1, 128, 62, 82}, OCN=128, BIAS, OCV/CPU)|4.050|4.034|1.00|
|conv::Conv::(GFLOPS=1.416, K=[3 x 3], IN={1, 128, 62, 82}, OCN=128, BIAS, OCV/CPU_FP16)|-|4.093|-|
|conv::Conv::(GFLOPS=1.500, K=[3 x 3], IN={1, 128, 64, 84}, OCN=128, BIAS, OCV/CPU)|4.923|4.506|1.09|
|conv::Conv::(GFLOPS=1.500, K=[3 x 3], IN={1, 128, 64, 84}, OCN=128, BIAS, OCV/CPU_FP16)|-|4.509|-|
|conv::Conv::(GFLOPS=1.586, K=[3 x 3], IN={1, 128, 66, 86}, OCN=128, BIAS, OCV/CPU)|4.759|4.476|1.06|
|conv::Conv::(GFLOPS=1.586, K=[3 x 3], IN={1, 128, 66, 86}, OCN=128, BIAS, OCV/CPU_FP16)|-|4.447|-|
|conv::Conv::(GFLOPS=1.595, K=[3 x 3], IN={1, 256, 26, 26}, OCN=512, P=[1 x 1], OCV/CPU)|6.079|5.628|1.08|
|conv::Conv::(GFLOPS=1.595, K=[3 x 3], IN={1, 256, 26, 26}, OCN=512, P=[1 x 1], OCV/CPU_FP16)|-|5.625|-|
|conv::Conv::(GFLOPS=1.595, K=[3 x 3], IN={1, 256, 52, 52}, OCN=512, S=[2 x 2], P=[1 x 1], OCV/CPU)|19.843|17.523|1.13|
|conv::Conv::(GFLOPS=1.595, K=[3 x 3], IN={1, 256, 52, 52}, OCN=512, S=[2 x 2], P=[1 x 1], OCV/CPU_FP16)|-|8.917|-|
|conv::Conv::(GFLOPS=1.595, K=[3 x 3], IN={1, 512, 13, 13}, OCN=1024, P=[1 x 1], OCV/CPU)|8.334|8.247|1.01|
|conv::Conv::(GFLOPS=1.595, K=[3 x 3], IN={1, 512, 13, 13}, OCN=1024, P=[1 x 1], OCV/CPU_FP16)|-|8.246|-|
|conv::Conv::(GFLOPS=1.595, K=[3 x 3], IN={1, 512, 26, 26}, OCN=1024, S=[2 x 2], P=[1 x 1], OCV/CPU)|23.164|18.199|1.27|
|conv::Conv::(GFLOPS=1.595, K=[3 x 3], IN={1, 512, 26, 26}, OCN=1024, S=[2 x 2], P=[1 x 1], OCV/CPU_FP16)|-|9.305|-|
|conv::Conv::(GFLOPS=1.596, K=[3 x 3], IN={1, 64, 104, 104}, OCN=128, P=[1 x 1], OCV/CPU)|5.184|5.178|1.00|
|conv::Conv::(GFLOPS=1.596, K=[3 x 3], IN={1, 64, 104, 104}, OCN=128, P=[1 x 1], OCV/CPU_FP16)|-|5.149|-|
|conv::Conv::(GFLOPS=1.596, K=[3 x 3], IN={1, 64, 208, 208}, OCN=128, S=[2 x 2], P=[1 x 1], OCV/CPU)|17.990|18.103|0.99|
|conv::Conv::(GFLOPS=1.596, K=[3 x 3], IN={1, 64, 208, 208}, OCN=128, S=[2 x 2], P=[1 x 1], OCV/CPU_FP16)|-|9.777|-|
|conv::Conv::(GFLOPS=1.596, K=[3 x 3], IN={1, 128, 52, 52}, OCN=256, P=[1 x 1], OCV/CPU)|4.831|4.522|1.07|
|conv::Conv::(GFLOPS=1.596, K=[3 x 3], IN={1, 128, 52, 52}, OCN=256, P=[1 x 1], OCV/CPU_FP16)|-|4.523|-|
|conv::Conv::(GFLOPS=1.596, K=[3 x 3], IN={1, 128, 104, 104}, OCN=256, S=[2 x 2], P=[1 x 1], OCV/CPU)|17.328|17.319|1.00|
|conv::Conv::(GFLOPS=1.596, K=[3 x 3], IN={1, 128, 104, 104}, OCN=256, S=[2 x 2], P=[1 x 1], OCV/CPU_FP16)|-|8.948|-|
|conv::Conv::(GFLOPS=1.598, K=[3 x 3], IN={1, 32, 208, 208}, OCN=64, P=[1 x 1], OCV/CPU)|5.944|5.961|1.00|
|conv::Conv::(GFLOPS=1.598, K=[3 x 3], IN={1, 32, 208, 208}, OCN=64, P=[1 x 1], OCV/CPU_FP16)|-|5.936|-|
|conv::Conv::(GFLOPS=1.598, K=[3 x 3], IN={1, 32, 416, 416}, OCN=64, S=[2 x 2], P=[1 x 1], OCV/CPU)|19.811|20.064|0.99|
|conv::Conv::(GFLOPS=1.598, K=[3 x 3], IN={1, 32, 416, 416}, OCN=64, S=[2 x 2], P=[1 x 1], OCV/CPU_FP16)|-|11.705|-|
|conv::Conv::(GFLOPS=1.659, K=[3 x 3], IN={1, 960, 10, 10}, OCN=960, PM=SAME, OCV/CPU)|22.398|17.686|1.27|
|conv::Conv::(GFLOPS=1.659, K=[3 x 3], IN={1, 960, 10, 10}, OCN=960, PM=SAME, OCV/CPU_FP16)|-|9.859|-|
|conv::Conv::(GFLOPS=1.660, K=[3 x 3], IN={1, 128, 75, 75}, OCN=128, G=128, P=[1 x 1], BIAS, OCV/CPU)|0.416|0.416|1.00|
|conv::Conv::(GFLOPS=1.660, K=[3 x 3], IN={1, 128, 75, 75}, OCN=128, G=128, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|0.417|-|
|conv::Conv::(GFLOPS=1.660, K=[3 x 3], IN={1, 128, 75, 75}, OCN=128, PM=SAME, OCV/CPU)|5.356|5.110|1.05|
|conv::Conv::(GFLOPS=1.660, K=[3 x 3], IN={1, 128, 75, 75}, OCN=128, PM=SAME, OCV/CPU_FP16)|-|5.114|-|
|conv::Conv::(GFLOPS=1.675, K=[3 x 3], IN={1, 128, 68, 88}, OCN=128, BIAS, OCV/CPU)|5.092|4.748|1.07|
|conv::Conv::(GFLOPS=1.675, K=[3 x 3], IN={1, 128, 68, 88}, OCN=128, BIAS, OCV/CPU_FP16)|-|4.754|-|
|conv::Conv::(GFLOPS=1.704, K=[3 x 3], IN={1, 256, 38, 38}, OCN=256, G=256, P=[1 x 1], BIAS, OCV/CPU)|0.260|0.229|1.13|
|conv::Conv::(GFLOPS=1.704, K=[3 x 3], IN={1, 256, 38, 38}, OCN=256, G=256, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|0.229|-|
|conv::Conv::(GFLOPS=1.704, K=[3 x 3], IN={1, 256, 38, 38}, OCN=256, PM=SAME, OCV/CPU)|5.872|5.460|1.08|
|conv::Conv::(GFLOPS=1.704, K=[3 x 3], IN={1, 256, 38, 38}, OCN=256, PM=SAME, OCV/CPU_FP16)|-|5.460|-|
|conv::Conv::(GFLOPS=1.704, K=[3 x 3], IN={1, 512, 19, 19}, OCN=512, G=512, P=[1 x 1], BIAS, OCV/CPU)|0.161|0.161|1.00|
|conv::Conv::(GFLOPS=1.704, K=[3 x 3], IN={1, 512, 19, 19}, OCN=512, G=512, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|0.161|-|
|conv::Conv::(GFLOPS=1.704, K=[3 x 3], IN={1, 512, 19, 19}, OCN=512, P=[1 x 1], BIAS, OCV/CPU)|7.176|7.175|1.00|
|conv::Conv::(GFLOPS=1.704, K=[3 x 3], IN={1, 512, 19, 19}, OCN=512, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|7.162|-|
|conv::Conv::(GFLOPS=1.704, K=[3 x 3], IN={1, 512, 19, 19}, OCN=512, PM=SAME, OCV/CPU)|7.174|7.185|1.00|
|conv::Conv::(GFLOPS=1.704, K=[3 x 3], IN={1, 512, 19, 19}, OCN=512, PM=SAME, OCV/CPU_FP16)|-|7.157|-|
|conv::Conv::(GFLOPS=1.766, K=[3 x 3], IN={1, 128, 70, 90}, OCN=128, BIAS, OCV/CPU)|5.400|5.180|1.04|
|conv::Conv::(GFLOPS=1.766, K=[3 x 3], IN={1, 128, 70, 90}, OCN=128, BIAS, OCV/CPU_FP16)|-|5.201|-|
|conv::Conv::(GFLOPS=1.859, K=[3 x 3], IN={1, 128, 72, 92}, OCN=128, BIAS, OCV/CPU)|5.330|5.188|1.03|
|conv::Conv::(GFLOPS=1.859, K=[3 x 3], IN={1, 128, 72, 92}, OCN=128, BIAS, OCV/CPU_FP16)|-|5.177|-|
|conv::Conv::(GFLOPS=1.888, K=[3 x 3], IN={1, 1024, 10, 10}, OCN=1024, G=1024, P=[1 x 1], BIAS, OCV/CPU)|0.115|0.115|1.00|
|conv::Conv::(GFLOPS=1.888, K=[3 x 3], IN={1, 1024, 10, 10}, OCN=1024, G=1024, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|0.115|-|
|conv::Conv::(GFLOPS=1.888, K=[3 x 3], IN={1, 1024, 10, 10}, OCN=1024, PM=SAME, OCV/CPU)|26.156|20.222|1.29|
|conv::Conv::(GFLOPS=1.888, K=[3 x 3], IN={1, 1024, 10, 10}, OCN=1024, PM=SAME, OCV/CPU_FP16)|-|11.203|-|
|conv::Conv::(GFLOPS=1.954, K=[3 x 3], IN={1, 128, 74, 94}, OCN=128, BIAS, OCV/CPU)|5.627|5.543|1.02|
|conv::Conv::(GFLOPS=1.954, K=[3 x 3], IN={1, 128, 74, 94}, OCN=128, BIAS, OCV/CPU_FP16)|-|5.506|-|
|conv::Conv::(GFLOPS=1.995, K=[9 x 9], IN={1, 3, 320, 400}, OCN=32, P=[4 x 4], BIAS, OCV/CPU)|27.925|27.741|1.01|
|conv::Conv::(GFLOPS=1.995, K=[9 x 9], IN={1, 3, 320, 400}, OCN=32, P=[4 x 4], BIAS, OCV/CPU_FP16)|-|17.217|-|
|conv::Conv::(GFLOPS=2.052, K=[3 x 3], IN={1, 128, 76, 96}, OCN=128, BIAS, OCV/CPU)|6.359|6.062|1.05|
|conv::Conv::(GFLOPS=2.052, K=[3 x 3], IN={1, 128, 76, 96}, OCN=128, BIAS, OCV/CPU_FP16)|-|6.048|-|
|conv::Conv::(GFLOPS=2.100, K=[3 x 3], IN={1, 144, 75, 75}, OCN=144, PM=SAME, OCV/CPU)|6.559|6.322|1.04|
|conv::Conv::(GFLOPS=2.100, K=[3 x 3], IN={1, 144, 75, 75}, OCN=144, PM=SAME, OCV/CPU_FP16)|-|6.280|-|
|conv::Conv::(GFLOPS=2.153, K=[3 x 3], IN={1, 128, 78, 98}, OCN=128, BIAS, OCV/CPU)|6.412|6.200|1.03|
|conv::Conv::(GFLOPS=2.153, K=[3 x 3], IN={1, 128, 78, 98}, OCN=128, BIAS, OCV/CPU_FP16)|-|6.197|-|
|conv::Conv::(GFLOPS=2.156, K=[3 x 3], IN={1, 576, 19, 19}, OCN=576, PM=SAME, OCV/CPU)|9.167|8.624|1.06|
|conv::Conv::(GFLOPS=2.156, K=[3 x 3], IN={1, 576, 19, 19}, OCN=576, PM=SAME, OCV/CPU_FP16)|-|8.626|-|
|conv::Conv::(GFLOPS=2.255, K=[3 x 3], IN={1, 128, 80, 100}, OCN=128, BIAS, OCV/CPU)|6.755|6.491|1.04|
|conv::Conv::(GFLOPS=2.255, K=[3 x 3], IN={1, 128, 80, 100}, OCN=128, BIAS, OCV/CPU_FP16)|-|6.520|-|
|conv::Conv::(GFLOPS=2.719, K=[3 x 3], IN={1, 96, 256, 256}, OCN=96, S=[2 x 2], PM=SAME, OCV/CPU)|35.664|34.752|1.03|
|conv::Conv::(GFLOPS=2.719, K=[3 x 3], IN={1, 96, 256, 256}, OCN=96, S=[2 x 2], PM=SAME, OCV/CPU_FP16)|-|20.260|-|
|conv::Conv::(GFLOPS=3.319, K=[3 x 3], IN={1, 128, 75, 75}, OCN=256, P=[1 x 1], BIAS, OCV/CPU)|9.514|9.414|1.01|
|conv::Conv::(GFLOPS=3.319, K=[3 x 3], IN={1, 128, 75, 75}, OCN=256, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|9.462|-|
|conv::Conv::(GFLOPS=3.321, K=[3 x 3], IN={1, 64, 150, 150}, OCN=128, P=[1 x 1], BIAS, OCV/CPU)|10.631|9.963|1.07|
|conv::Conv::(GFLOPS=3.321, K=[3 x 3], IN={1, 64, 150, 150}, OCN=128, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|9.935|-|
|conv::Conv::(GFLOPS=3.398, K=[7 x 7], IN={1, 128, 46, 46}, OCN=128, P=[3 x 3], BIAS, OCV/CPU)|37.465|36.798|1.02|
|conv::Conv::(GFLOPS=3.398, K=[7 x 7], IN={1, 128, 46, 46}, OCN=128, P=[3 x 3], BIAS, OCV/CPU_FP16)|-|19.569|-|
|conv::Conv::(GFLOPS=3.407, K=[3 x 3], IN={1, 512, 19, 19}, OCN=1024, D=[6 x 6], P=[6 x 6], BIAS, OCV/CPU)|38.157|36.157|1.06|
|conv::Conv::(GFLOPS=3.407, K=[3 x 3], IN={1, 512, 19, 19}, OCN=1024, D=[6 x 6], P=[6 x 6], BIAS, OCV/CPU_FP16)|-|18.902|-|
|conv::Conv::(GFLOPS=3.408, K=[3 x 3], IN={1, 256, 38, 38}, OCN=512, P=[1 x 1], BIAS, OCV/CPU)|10.356|10.401|1.00|
|conv::Conv::(GFLOPS=3.408, K=[3 x 3], IN={1, 256, 38, 38}, OCN=512, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|10.360|-|
|conv::Conv::(GFLOPS=4.247, K=[3 x 3], IN={1, 480, 32, 32}, OCN=480, PM=SAME, OCV/CPU)|12.641|12.150|1.04|
|conv::Conv::(GFLOPS=4.247, K=[3 x 3], IN={1, 480, 32, 32}, OCN=480, PM=SAME, OCV/CPU_FP16)|-|12.162|-|
|conv::Conv::(GFLOPS=4.247, K=[5 x 5], IN={1, 144, 128, 128}, OCN=144, S=[2 x 2], PM=SAME, OCV/CPU)|50.545|50.505|1.00|
|conv::Conv::(GFLOPS=4.247, K=[5 x 5], IN={1, 144, 128, 128}, OCN=144, S=[2 x 2], PM=SAME, OCV/CPU_FP16)|-|27.950|-|
|conv::Conv::(GFLOPS=4.566, K=[7 x 7], IN={1, 172, 46, 46}, OCN=128, P=[3 x 3], BIAS, OCV/CPU)|54.233|49.603|1.09|
|conv::Conv::(GFLOPS=4.566, K=[7 x 7], IN={1, 172, 46, 46}, OCN=128, P=[3 x 3], BIAS, OCV/CPU_FP16)|-|26.515|-|
|conv::Conv::(GFLOPS=4.993, K=[3 x 3], IN={1, 256, 46, 46}, OCN=512, P=[1 x 1], BIAS, OCV/CPU)|13.779|12.968|1.06|
|conv::Conv::(GFLOPS=4.993, K=[3 x 3], IN={1, 256, 46, 46}, OCN=512, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|12.984|-|
|conv::Conv::(GFLOPS=4.993, K=[3 x 3], IN={1, 512, 46, 46}, OCN=256, P=[1 x 1], BIAS, OCV/CPU)|15.809|15.329|1.03|
|conv::Conv::(GFLOPS=4.993, K=[3 x 3], IN={1, 512, 46, 46}, OCN=256, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|15.433|-|
|conv::Conv::(GFLOPS=4.994, K=[3 x 3], IN={1, 128, 92, 92}, OCN=256, P=[1 x 1], BIAS, OCV/CPU)|14.563|14.527|1.00|
|conv::Conv::(GFLOPS=4.994, K=[3 x 3], IN={1, 128, 92, 92}, OCN=256, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|14.480|-|
|conv::Conv::(GFLOPS=4.997, K=[3 x 3], IN={1, 64, 184, 184}, OCN=128, P=[1 x 1], BIAS, OCV/CPU)|16.714|16.484|1.01|
|conv::Conv::(GFLOPS=4.997, K=[3 x 3], IN={1, 64, 184, 184}, OCN=128, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|16.362|-|
|conv::Conv::(GFLOPS=5.780, K=[5 x 5], IN={1, 672, 32, 32}, OCN=672, S=[2 x 2], PM=SAME, OCV/CPU)|77.832|65.729|1.18|
|conv::Conv::(GFLOPS=5.780, K=[5 x 5], IN={1, 672, 32, 32}, OCN=672, S=[2 x 2], PM=SAME, OCV/CPU_FP16)|-|32.065|-|
|conv::Conv::(GFLOPS=6.116, K=[3 x 3], IN={1, 1152, 16, 16}, OCN=1152, PM=SAME, OCV/CPU)|21.903|20.386|1.07|
|conv::Conv::(GFLOPS=6.116, K=[3 x 3], IN={1, 1152, 16, 16}, OCN=1152, PM=SAME, OCV/CPU_FP16)|-|20.416|-|
|conv::Conv::(GFLOPS=6.118, K=[3 x 3], IN={1, 144, 128, 128}, OCN=144, PM=SAME, OCV/CPU)|20.405|18.148|1.12|
|conv::Conv::(GFLOPS=6.118, K=[3 x 3], IN={1, 144, 128, 128}, OCN=144, PM=SAME, OCV/CPU_FP16)|-|18.128|-|
|conv::Conv::(GFLOPS=6.637, K=[3 x 3], IN={1, 256, 75, 75}, OCN=256, P=[1 x 1], BIAS, OCV/CPU)|20.334|18.521|1.10|
|conv::Conv::(GFLOPS=6.637, K=[3 x 3], IN={1, 256, 75, 75}, OCN=256, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|18.495|-|
|conv::Conv::(GFLOPS=6.638, K=[3 x 3], IN={1, 128, 150, 150}, OCN=128, P=[1 x 1], BIAS, OCV/CPU)|21.527|19.584|1.10|
|conv::Conv::(GFLOPS=6.638, K=[3 x 3], IN={1, 128, 150, 150}, OCN=128, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|19.630|-|
|conv::Conv::(GFLOPS=6.641, K=[3 x 3], IN={1, 64, 150, 200}, OCN=192, PM=SAME, BIAS, OCV/CPU)|22.715|20.057|1.13|
|conv::Conv::(GFLOPS=6.641, K=[3 x 3], IN={1, 64, 150, 200}, OCN=192, PM=SAME, BIAS, OCV/CPU_FP16)|-|20.068|-|
|conv::Conv::(GFLOPS=6.641, K=[3 x 3], IN={1, 64, 300, 300}, OCN=64, P=[1 x 1], BIAS, OCV/CPU)|26.228|24.992|1.05|
|conv::Conv::(GFLOPS=6.641, K=[3 x 3], IN={1, 64, 300, 300}, OCN=64, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|24.957|-|
|conv::Conv::(GFLOPS=6.814, K=[3 x 3], IN={1, 512, 38, 38}, OCN=512, P=[1 x 1], BIAS, OCV/CPU)|21.524|21.581|1.00|
|conv::Conv::(GFLOPS=6.814, K=[3 x 3], IN={1, 512, 38, 38}, OCN=512, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|21.782|-|
|conv::Conv::(GFLOPS=8.025, K=[3 x 3], IN={1, 1024, 19, 19}, OCN=1206, P=[1 x 1], BIAS, OCV/CPU)|34.094|31.964|1.07|
|conv::Conv::(GFLOPS=8.025, K=[3 x 3], IN={1, 1024, 19, 19}, OCN=1206, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|31.925|-|
|conv::Conv::(GFLOPS=9.986, K=[3 x 3], IN={1, 512, 46, 46}, OCN=512, P=[1 x 1], BIAS, OCV/CPU)|28.677|27.813|1.03|
|conv::Conv::(GFLOPS=9.986, K=[3 x 3], IN={1, 512, 46, 46}, OCN=512, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|27.808|-|
|conv::Conv::(GFLOPS=9.987, K=[3 x 3], IN={1, 256, 92, 92}, OCN=256, P=[1 x 1], BIAS, OCV/CPU)|31.274|27.892|1.12|
|conv::Conv::(GFLOPS=9.987, K=[3 x 3], IN={1, 256, 92, 92}, OCN=256, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|27.910|-|
|conv::Conv::(GFLOPS=9.989, K=[3 x 3], IN={1, 128, 184, 184}, OCN=128, P=[1 x 1], BIAS, OCV/CPU)|30.533|30.007|1.02|
|conv::Conv::(GFLOPS=9.989, K=[3 x 3], IN={1, 128, 184, 184}, OCN=128, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|30.089|-|
|conv::Conv::(GFLOPS=9.993, K=[3 x 3], IN={1, 64, 368, 368}, OCN=64, P=[1 x 1], BIAS, OCV/CPU)|39.837|38.312|1.04|
|conv::Conv::(GFLOPS=9.993, K=[3 x 3], IN={1, 64, 368, 368}, OCN=64, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|38.477|-|
|conv::Conv::(GFLOPS=10.087, K=[3 x 3], IN={1, 576, 38, 50}, OCN=512, PM=SAME, BIAS, OCV/CPU)|32.480|29.237|1.11|
|conv::Conv::(GFLOPS=10.087, K=[3 x 3], IN={1, 576, 38, 50}, OCN=512, PM=SAME, BIAS, OCV/CPU_FP16)|-|29.452|-|
|conv::Conv::(GFLOPS=10.701, K=[3 x 3], IN={1, 512, 38, 38}, OCN=804, P=[1 x 1], BIAS, OCV/CPU)|33.544|32.832|1.02|
|conv::Conv::(GFLOPS=10.701, K=[3 x 3], IN={1, 512, 38, 38}, OCN=804, P=[1 x 1], BIAS, OCV/CPU_FP16)|-|32.784|-|
|conv::Conv::(GFLOPS=11.797, K=[5 x 5], IN={1, 240, 64, 64}, OCN=240, PM=SAME, OCV/CPU)|134.481|130.678|1.03|
|conv::Conv::(GFLOPS=11.797, K=[5 x 5], IN={1, 240, 64, 64}, OCN=240, PM=SAME, OCV/CPU_FP16)|-|70.134|-|
|conv::Conv::(GFLOPS=11.797, K=[5 x 5], IN={1, 480, 32, 32}, OCN=480, PM=SAME, OCV/CPU)|127.930|126.530|1.01|
|conv::Conv::(GFLOPS=11.797, K=[5 x 5], IN={1, 480, 32, 32}, OCN=480, PM=SAME, OCV/CPU_FP16)|-|65.261|-|
|conv::Conv::(GFLOPS=16.987, K=[5 x 5], IN={1, 1152, 16, 16}, OCN=1152, PM=SAME, OCV/CPU)|201.346|187.007|1.08|
|conv::Conv::(GFLOPS=16.987, K=[5 x 5], IN={1, 1152, 16, 16}, OCN=1152, PM=SAME, OCV/CPU_FP16)|-|91.525|-|
|conv::Conv::(GFLOPS=23.122, K=[5 x 5], IN={1, 672, 32, 32}, OCN=672, PM=SAME, OCV/CPU)|252.038|245.587|1.03|
|conv::Conv::(GFLOPS=23.122, K=[5 x 5], IN={1, 672, 32, 32}, OCN=672, PM=SAME, OCV/CPU_FP16)|-|125.477|-|

### 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
2023-05-17 09:38:33 +03:00
cudawarped
99ef35a353 Videoio: FFMpeg remove locks if OPENCV_FFMPEG_IS_THREAD_SAFE==true 2023-05-17 08:20:46 +03:00
Alexander Smorkalov
05084aa63e Restored Java bindings for CPU features management. 2023-05-16 18:04:09 +03:00
Maksim Shabunin
001a2c5195
Merge pull request #23606 from mshabunin:fix-ffmpeg-packet-limit
videoio/FFmpeg: increased packet read attempt limit, allow configuring it

resolves #9455
related #3225

* Use different counters for wrong packets recieved by demuxer and errors from decoder
* Allow modifying these counters via environment variables `OPENCV_FFMPEG_READ_ATTEMPTS`/`OPENCV_FFMPEG_DECODE_ATTEMPTS`
* Added logging when reading breaks at one of error limits

Notes:
* I've been able to reproduce original issue with a video file with 14 total streams (video + audio + subtitles), at some point in the video only packets from the last stream are being sent by the demuxer, thus exceeding our limit. For my specific video total number of packets from wrong stream was about 2700. I've chosen 4096 as default value.
* Default limit of decoding attempts is quite low, because I'm not sure in which cases it can be exceeded (network stream?). I tried to read 8k video from the disk, but it did not cause break at decode point.
2023-05-16 14:31:04 +03:00
Alexander Smorkalov
59ca444b26
Merge pull request #23560 from WanliZhong:eltwise_cuda_bug
DNN/CUDA: Solve the bug of same shape broadcast with CUDA
2023-05-16 14:16:37 +03:00
Alexander Alekhin
04d71da6e7 Merge pull request #23566 from seanm:atomic-bool 2023-05-16 10:46:59 +00:00
zihaomu
91b6c8507a remove flag of convolution 2023-05-16 15:29:20 +08:00
Alexander Smorkalov
0800574c12
Merge pull request #23619 from TinyTinni:pixel-info-font-color
Fixes pixel info color font for dark Qt themes
2023-05-16 09:15:15 +03:00
Matthias Möller
fc43e51331 sets pixel info font colors based on current palette 2023-05-15 17:42:48 +02:00
Dmitry Kurtaev
a8d3d1f6f9
Merge pull request #23604 from dkurt:dnn_no_protobuf
Build DNN without Protobuf

DNN module can be built without Protobuf for Darknet, TFLite, OpenVINO, Torch (not PyTorch) models.

```
cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_LIST=dnn \
    -DWITH_PROTOBUF=OFF \
    -DWITH_OPENCL=OFF

7.1M    lib/libopencv_dnn.so.4.7.0
```


```
cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_LIST=dnn \
    -DWITH_OPENCL=OFF

3.9M    lib/libopencv_dnn.so.4.7.0
```

### 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
2023-05-15 12:23:18 +03:00
wanli
46991bcd62 Solve the bug of same shape broadcast with CUDA 2023-05-15 13:55:38 +08:00
Alexander Smorkalov
85b04f0b4d
Merge pull request #23557 from WanliZhong:eltwise_cpu_bug
fix nary elementwise bug in cpu
2023-05-11 15:56:46 +03:00
Dmitry Kurtaev
676afdc494 Update FlatBuffers source code to 23.5.9 2023-05-10 14:39:36 +03:00
Giles Payne
a44a6f6c87 Fix issue in Objective-C generator when a class name is a substring of its base class name 2023-05-10 15:34:25 +09:00
wanli
85cc4086c8 fix nary elementwise bug in cpu 2023-05-10 14:29:33 +08:00
vovka643
d6dc91b4d4 Added depricated_backends list. Added new information masseges. It needs to inform user, when he tries to use depricated or not uses backend 2023-05-05 14:22:18 +03:00
Alexander Smorkalov
25c28c5da4
Merge pull request #23485 from zihaomu:add_onnx_where
DNN: add ONNX where node support
2023-05-05 09:21:07 +03:00
zihaomu
0513741a85 add broadcast where node 2023-05-05 11:16:19 +08:00
Alexander Smorkalov
351589e5fb
Merge pull request #23491 from fengyuentau:patch_for_segment_anything
Fixes for Segment Anything
2023-05-04 21:07:58 +03:00
kallaballa
a2be9e9fc1 Log a debug message if a capture backend is generally available but isn't capabable of a capture mode. 2023-05-04 19:18:58 +03:00
Stefan Becker
e55784a1e8 ChArUco pre460 pattern support 2023-05-04 16:59:04 +03:00
n0099
868787c364
Merge pull request #23342 from n0099:#23335
Improve document of cv::RotatedRect for #23335 #23342

fix #23335

### 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
2023-05-03 14:15:53 +03:00
Sean McBride
27e10efa66 Use std::atomic<bool> as it's necessary for correct thread safety
Now that C++11 is required, we can unconditionally use std::atomic in this case, which is more correct.
2023-05-01 16:44:34 -04:00
Alexander Alekhin
3c76b33532 Merge pull request #22614 from zihaomu:add_std2DB_API 2023-05-01 19:37:23 +00:00
Maxim Smolskiy
658f18c713
Fix function name in comment 2023-04-30 17:30:01 +03:00
zihaomu
8be93a6de7 add scale factor to DB demo. 2023-04-30 22:03:21 +08:00