Skip to content

Add CV_WRAP to registerOutput for language bindings support#27260

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
utibenkei:add_cv_wrap_to_dnn_registeroutput
Apr 26, 2025
Merged

Add CV_WRAP to registerOutput for language bindings support#27260
asmorkalov merged 1 commit intoopencv:4.xfrom
utibenkei:add_cv_wrap_to_dnn_registeroutput

Conversation

@utibenkei
Copy link
Copy Markdown
Contributor

Description:
This pull request adds the CV_WRAP annotation to the cv::dnn::Net::registerOutput method to make it accessible from language bindings such as Python and Java.

Background
The methods getUnconnectedOutLayers and getUnconnectedOutLayersNames are deprecated, and registerOutput is the recommended alternative. However, it is currently not available from wrappers, making migration difficult.

Changes
Added CV_WRAP to Net::registerOutput in dnn.hpp.

Notes
This change does not affect existing functionality and only exposes the method to binding generators.

Please let me know if further adjustments are needed.

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

@asmorkalov asmorkalov merged commit fe5bd15 into opencv:4.x Apr 26, 2025
27 of 28 checks passed
@asmorkalov asmorkalov mentioned this pull request Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants