docs: MorphTypes enum uses 'element' instead of 'kernel' in LaTeX formulas

#84 · open · 0 comments

View on GitHub ↗

lstahlman

> Mirrored from upstream: https://github.com/opencv/opencv/issues/28513 > Original author: @PDGGK · created 2026-02-09T14:31:55Z > Upstream labels: _none_ > Selection: mirrored by mirror-issues.py --- ## Description In `modules/imgproc/include/opencv2/imgproc.hpp`, the `MorphTypes` enum (lines 220-228) uses `\texttt{element}` in LaTeX formulas, but the actual parameter name in `morphologyEx()`, `erode()`, and `dilate()` functions is `kernel`. This is similar to issue #18095. ## Affected Code ```cpp MORPH_OPEN = 2, //!< \f[\texttt{dst} = \mathrm{open} ( \texttt{src} , \texttt{element} )...\f] MORPH_CLOSE = 3, //!< \f[\texttt{dst} = \mathrm{close} ( \texttt{src} , \texttt{element} )...\f] MORPH_GRADIENT = 4, //!< \f[\texttt{dst} = \mathrm{morph\_grad} ( \texttt{src} , \texttt{element} )...\f] MORPH_TOPHAT = 5, //!< \f[\texttt{dst} = \mathrm{tophat} ( \texttt{src} , \texttt{element} )...\f] MORPH_BLACKHAT = 6, //!< \f[\texttt{dst} = \mathrm{blackhat} ( \texttt{src} , \texttt{element} )...\f] ``` ## Expected `\texttt{element}` should be `\texttt{kernel}` to match the `morphologyEx()` function signature: ```cpp CV_EXPORTS_W void morphologyEx( InputArray src, OutputArray dst, int op, InputArray kernel, ...); ``` I'll take this issue. PR with fix: #28502

Comments