Alexander Smorkalov 64bbaa9f41 Merge pull request #27972 from asmorkalov:as/dst_mat_type
Force empty output type where it's defined in API #27972

The PR replaces:
- https://github.com/opencv/opencv/pull/27936
- https://github.com/opencv/opencv/pull/21059

Empty matrix has undefined type, so user code should not relay on the output type, if it's empty. The PR introduces some exceptions:
- copyTo documentation defines, that the method re-create output buffer and set it's type.
- convertTo has output type as parameter and output type is defined and expected.
2025-11-10 08:00:17 +03:00
2020-02-26 15:12:45 +03:00
2018-10-11 17:57:51 +00:00
2025-08-01 09:50:10 +03:00
2024-03-03 23:37:07 +05:30

OpenCV: Open Source Computer Vision Library

Resources

Contributing

Please read the contribution guidelines before starting work on a pull request.

Summary of the guidelines:

  • One pull request per issue;
  • Choose the right base branch;
  • Include tests and documentation;
  • Clean up "oops" commits before submitting;
  • Follow the coding style guide.

Additional Resources

Description
Open Source Computer Vision Library opencv.org
Readme Apache-2.0 603 MiB
Languages
C++ 87.5%
C 3.1%
Python 3%
CMake 2%
Java 1.5%
Other 2.7%