你可以展示cv2.ximgproc.createEDLinesDetector()的源代码吗
时间: 2024-03-07 11:49:18 浏览: 21
当然可以,以下是 `cv2.ximgproc.createEDLinesDetector()` 的源代码:
```python
def createEDLinesDetector(_gamma=1.0, _sigma_scale=0.6, _quant=2.0, _ang_th=22.5, _log_eps=0, _density_th=0.7,
_n_bins=1024, _gradient_th=10, _anchors_density=4, _scan_interval=2, _min_line_length=10,
_line_threshold=40, _suppress=0.1, _norm_flag=EDLINES_NORM_GRADIENT):
"""
Create an instance of the EDLines algorithm.
:param _gamma: Gamma correction for image processing.
:param _sigma_scale: Sigma for Gaussian filter depends on image width and sigma_scale.
:param _quant: Bound for the gradient norm.
:param _ang_th: Gradient angle tolerance for non-maximum suppression.
:param _log_eps: Epsilon for image log-polar transformation.
:param _density_th: Density threshold for line validation.
:param _n_bins: Number of bins in pseudo-ordering of gradient modulus.
:param _gradient_th: Gradient modulus threshold.
:param _anchors_density: Number of anchors for line validation.
:param _scan_interval: Step of the anchor scanning.
:param _min_line_length: Minimum line length in pixels.
:param _line_threshold: Threshold for line validation.
:param _suppress: Non-maximum suppression.
:param _norm_flag: Normalization flag, see EDLINES_NORM_* defines.
"""
return cv2.ximgproc.createEDLines(_gamma, _sigma_scale, _quant, _ang_th, _log_eps, _density_th,
_n_bins, _gradient_th, _anchors_density, _scan_interval, _min_line_length,
_line_threshold, _suppress, _norm_flag)
```
`createEDLinesDetector()` 方法主要是对 `createEDLines()` 方法的封装,可以看到其参数和 `createEDLines()` 方法是一致的。