是否可以加强图像边缘、轮廓使得图像清晰化
https://blog.csdn.net/Miracle0_0/article/details/82051497
采用cv2.filter2D
进行卷积核滤波
#图像锐化卷积核
kernel_sharpen_1 = np.array([
[-1,-1,-1],
[-1,9,-1],
[-1,-1,-1]])
kernel_sharpen_2 = np.array([
[1,1,1],
[1,-7,1],
[1,1,1]])
kernel_sharpen_3 = np.array([
[-1,-1,-1,-1,-1],
[-1,2,2,2,-1],
[-1,2,8,2,-1],
[-1,2,2,2,-1],
[-1,-1,-1,-1,-1]])/8.0
kernel_sharpen_4 = np.array([
[0,-1,0],
[-1,5,-1],
[0,-1,0]])
https://blog.csdn.net/zouxy09/article/details/49080029
kernel_edge_1 = np.array([
[0,0,0,0,0],
[0,0,0,0,0],
[-1,-1,2,0,0],
[0,0,0,0,0],
[0,0,0,0,0],])
kernel_edge_2 = np.array([
[0,0,-1,0,0],
[0,0,-1,0,0],
[0,0,4,0,0],
[0,0,-1,0,0],
[0,0,-1,0,0],])
kernel_edge_3 = np.array([
[-1,0,0,0,0],
[0,-2,0,0,0],
[0,0,6,0,0],
[0,0,0,-2,0],
[0,0,0,0,-1],])
kernel_edge_4 = np.array([
[-1,-1,-1],
[-1,8,-1],
[-1,-1,-1]])
https://www.cnblogs.com/denny402/p/5125253.html
TODO:这个skimage的跑不出效果噻,不知道为啥,用openCV的
edges = cv.Canny(img,100,200)
edges2 = cv.Canny(img,50,250)
edges3 = cv.Canny(img,0,255)
gabor滤波可用来进行边缘检测和纹理特征提取。通过修改frequency值来调整滤波效果,返回一对边缘结果,一个是用真实滤波核的滤波结果,一个是想象的滤波核的滤波结果。
https://www.cnblogs.com/denny402/p/5160955.html
这种方法应该是检测亚像素或基础图形的拟合,效果太不好
https://www.cnblogs.com/denny402/p/5133086.html
https://docs.opencv.org/master/dc/dff/tutorial_py_pyramids.html
https://docs.opencv.org/master/d5/d0f/tutorial_py_gradients.html
Sobel and Scharr Derivatives
Laplacian Derivatives
laplacian = cv.Laplacian(img,cv.CV_64F)
sobelx = cv.Sobel(img,cv.CV_64F,1,0,ksize=5)
sobely = cv.Sobel(img,cv.CV_64F,0,1,ksize=5)