8000 Add MORPH_DIAMOND support to samples and tutorials by krikera · Pull Request #27492 · opencv/opencv · GitHub
[go: up one dir, main page]

Skip to content

Add MORPH_DIAMOND support to samples and tutorials #27492

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

Merged
merged 1 commit into from
Jun 30, 2025
Merged

Conversation

krikera
Copy link
Contributor
@krikera krikera commented Jun 27, 2025

This PR adds MORPH_DIAMOND support to samples and tutorials

Fixes #27489

Overview

This PR updates existing morphological operation samples and tutorials to include support for the MORPH_DIAMOND structuring element that was added in PR #27441.

What's been changed:

Documentation Updates:

  • Python tutorial (doc/py_tutorials/py_imgproc/py_morphological_ops/py_morphological_ops.markdown): Added diamond kernel example with expected output
  • C++ tutorial (doc/tutorials/imgproc/erosion_dilatation/erosion_dilatation.markdown): Added MORPH_DIAMOND to the list of available shapes
  • JavaScript tutorial (doc/js_tutorials/js_imgproc/js_morphological_ops/js_morphological_ops.markdown): Updated description to mention diamond-shaped kernels

Sample Code Updates:

  • Python samples (3 files): Added diamond shape option to morphology demos
  • C++ samples (4 files): Added diamond shape with 'd' hotkey and trackbar options
  • Java samples (1 file): Added diamond to dropdown menu
  • GPU sample: Added diamond shape support with 'd' hotkey

Notes

  • Followed existing patterns for shape selection (diamond is index 3)
  • No new dependencies or functionality added
  • Changes are minimal and focused only on exposing the existing feature

Checklist

  • I agree to contribute to OpenCV under Apache 2 License
  • The PR is proposed to the proper branch (4.x)
  • There is a reference to the original bug/issue (if applicable)
  • The code follows OpenCV coding style
  • The code is properly tested

@asmorkalov asmorkalov self-assigned this Jun 30, 2025
@asmorkalov asmorkalov added this to the 4.12.0 milestone Jun 30, 2025
@asmorkalov asmorkalov merged commit 677c4ee into opencv:4.x Jun 30, 2025
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add MORPH_DIAMOND support to existing samples and tutorials
2 participants
0