效果:

图像处理之边缘提取_代码

代码:

import numpy as np
from matplotlib import pyplot as plt
import cv2 as cv

init = cv.imread('JAX_Tile_004_RGB.png', 0)
init2 = cv.Canny(init, 30, 100)

plt.subplot(121)
plt.imshow(init)
plt.subplot(122)
plt.imshow(init2)
plt.show()