Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removing obsolete cpp samples as part of samples cleanup #25252

Open
wants to merge 10 commits into
base: 5.x
Choose a base branch
from

Conversation

gursimarsingh
Copy link

@gursimarsingh gursimarsingh commented Mar 22, 2024

Clean Samples #25006
This PR removes 39 outdated C++ samples from the project, as part of an effort to keep the codebase clean and focused on current best practices.

Removed Samples:

camshiftdemo.cpp
cloning_demo.cpp
cloning_gui.cpp
create_mask.cpp
detect_blob.cpp
dft.cpp
dis_opticalflow.cpp
distrans.cpp
ela.cpp
epipolar_lines.cpp
falsecolor.cpp
inpaint.cpp
kalman.cpp
kmeans.cpp
laplace.cpp
lsd_lines.cpp
mask_tmpl.cpp
matchmethod_orb_akaze_brisk.cpp
minarea.cpp
phase_corr.cpp
polar_transforms.cpp
segment_objects.cpp
squares.cpp
text_skewness_correction.cpp
warpPerspective_demo.cpp
watershed.cpp
imagelist_creator.cpp
imagelist_reader.cpp
imgcodecs_jpeg.cpp
intersectExample.cpp
videocapture_audio.cpp -- will be merged with videocapture_with_audio
videocapture_microphone.cpp -- will be merged with videocapture_with_audio
videocapture_openni.cpp -- will be merged with videocapture_depth
videocapture_realsense.cpp -- will be merged with videocapture_depth
videocapture_starter.cpp
videocapture_basic.cpp
videocapture_camera.cpp
videocapture_image_sequence.cpp
stitching.cpp -- will be merged with stitching_detailed

These changes aim to improve the repository's clarity and usability by removing examples that are no longer relevant or have been superseded by more up-to-date techniques.

@gursimarsingh gursimarsingh changed the title removing obselete samples as part of cleanup removing obselete cpp samples as part of samples cleanup Mar 22, 2024
@gursimarsingh gursimarsingh added the cleanup Code cleanup (e.g, drop legacy C-API, legacy unmaintained code) label Mar 22, 2024
@gursimarsingh gursimarsingh self-assigned this Mar 22, 2024
@vpisarev
Copy link
Contributor

vpisarev commented Mar 22, 2024

@gursimarsingh, thanks! it looks like some of the removed samples are referenced in documentation: https://pullrequest.opencv.org/buildbot/builders/precommit_docs/builds/106505/steps/make%20doxygen/logs/warnings%20%2818%29. Please, fix it.

@gursimarsingh gursimarsingh changed the title removing obselete cpp samples as part of samples cleanup removing obsolete cpp samples as part of samples cleanup Mar 22, 2024
@gursimarsingh
Copy link
Author

@vpisarev Documentation build issue has been resloved

Removing more obsolete cpp samples as part of cleanup

removed stitching and obselete video capture samples
@gursimarsingh gursimarsingh marked this pull request as draft March 25, 2024 11:29
@gursimarsingh gursimarsingh marked this pull request as ready for review March 27, 2024 14:21
@asmorkalov
Copy link
Contributor

Hello @vpisarev @gursimarsingh @mshabunin @opencv-alalek I have alternative proposal for cleanup:

  • For stitching and other samples that are part of tutorial: move the code to samples/cpp/tutorial_code/<module>/<tutorial name>. It's already widely used practice in OpenCV.
  • For things like kmeans/svd/kalman/etc - create snippets or primitives folder and move code there. I'm strongly against of snippets removal from reference API. Also we can place python snippets there for the cases, when bindings are not obvious and use the same doxygen approach.
  • Stitching detailed, calibration samples, stereo - cleanup, make more user friendly and move to apps. folder. They are more then API samples and useful themself as apps.
  • Remove samples that use old C API and some legacy approaches as cascades, if they are not referenced in documentation.

@mshabunin
Copy link
Contributor

  • For stitching and other samples that are part of tutorial: move the code to samples/cpp/tutorial_code/<module>/<tutorial name>. It's already widely used practice in OpenCV.

I think it would be more convenient to move such samples to respective modules, e.g. modules/imgproc/samples. Division into "samples" and "tutorial code" looks a bit artificial. And tutorials themselves can be moved to their modules as well - we already use this approach in opencv_contrib.

  • For things like kmeans/svd/kalman/etc - create snippets or primitives folder and move code there. I'm strongly against of snippets removal from reference API. Also we can place python snippets there for the cases, when bindings are not obvious and use the same doxygen approach.

IMO, it would be better to avoid synthetic files with code snippets, it would be better to use snippets from samples as we do now.

Also, see discussion and my comment in the issue: #25006 (comment)

@gursimarsingh gursimarsingh marked this pull request as draft April 15, 2024 13:23
@gursimarsingh gursimarsingh marked this pull request as ready for review April 17, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: samples cleanup Code cleanup (e.g, drop legacy C-API, legacy unmaintained code)
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

None yet

5 participants