Merge pull request #29594 from abhishek-gola:bitcast_matmul_dft_layers

Added Bitcast layer & extended MatMul and DFT layers support - #29594

### Pull Request Readiness Checklist

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

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Abhishek Gola
2026-09-01 12:53:57 +05:30
committed by GitHub
parent 16e83222dc
commit c7dd924be3
14 changed files with 542 additions and 90 deletions

View File

@@ -42,8 +42,10 @@ int numpyTypeToCvDepth(int typenum)
case NPY_SHORT: return CV_16S;
case NPY_UINT: return CV_32U;
case NPY_INT: return CV_32S;
case NPY_LONGLONG: return CV_64S;
case NPY_ULONGLONG: return CV_64U;
// 'long' is 64-bit on LP64 but 32-bit on LLP64, so decide by size, not by name.
case NPY_LONG: return NPY_SIZEOF_LONG == 8 ? CV_64S : CV_32S;
case NPY_ULONG: return NPY_SIZEOF_LONG == 8 ? CV_64U : CV_32U;
case NPY_HALF: return CV_16F;
case NPY_FLOAT: return CV_32F;