Skip to content

Split cv2.cpp#21182

Merged
alalek merged 4 commits intoopencv:4.xfrom
mshabunin:split-cv2cpp
Dec 5, 2021
Merged

Split cv2.cpp#21182
alalek merged 4 commits intoopencv:4.xfrom
mshabunin:split-cv2cpp

Conversation

@mshabunin
Copy link
Copy Markdown
Contributor

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 other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • 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

@alalek
Copy link
Copy Markdown
Member

alalek commented Dec 3, 2021

IMO problem is not about cv2.cpp code itself. It is related to huge generated files (by binding generator), which are included into cv2.cpp.
This approach is fine, could be used as a first step.

@mshabunin mshabunin marked this pull request as ready for review December 3, 2021 13:41
@mshabunin
Copy link
Copy Markdown
Contributor Author

Yes, I have concerns too. But there is still a chance that this will help.

CLOC:

  • cv2.cpp before change: ~2000
  • cv2.cpp + cv2*.hpp after change: ~900

Tests seem to pass now. I can squash commits if necessary.

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@alalek alalek merged commit 973e1ac into opencv:4.x Dec 5, 2021
@mshabunin mshabunin deleted the split-cv2cpp branch December 5, 2021 13:44
@asmorkalov
Copy link
Copy Markdown
Contributor

cc @asenyaev

@alalek alalek mentioned this pull request Dec 30, 2021
@alalek alalek mentioned this pull request Feb 22, 2022
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
Split cv2.cpp

* split cv2.cpp: util, numpy

* split cv2.cpp: convert

* split cv2.cpp: highgui, more utils

* split cv2.cpp: fix numpy import
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.

Task: split cv2.cpp compilation

3 participants