我需要仅使用我的方法以及 matplotlib OpenCV 和 NumPy 构建 LoG 文件管理器(而不是仅使用过滤器来帮助计算的内置函数)
def edgeDetectionZeroCrossingLOG(img: np.ndarray) -> (np.ndarray):
"""
Detecting edges using the "ZeroCrossingLOG" method
:param I: Input image
:return: :return: Edge matrix
"""
kernel = np.ndarray((3, 3))
b_img = blurImage1(img, kernel)
k = np.array([[0, 1, 0],
[1, -4, 1],
[0, 1, 0]])
img_dervative = conv2D(img, k)
***Zero-Crossing***
Run Code Online (Sandbox Code Playgroud)
脚步:
def blurImage1(in_image: np.ndarray, kernel_size: np.ndarray) -> np.ndarray:
"""
Blur an image using a Gaussian kernel
:param inImage: Input image
:param kernelSize: Kernel size
:return: The …Run Code Online (Sandbox Code Playgroud)