完成时间:2017/1/23
我的实现结果如下:(图一为原图,图二为边缘检测结果) 关于Sobel算子(英文部分来源于Wikipedia) The Sobel operator, sometimes called the Sobel–Feldman operator or So…
在torch.nn.functional.conv2d()中使用自己构造的sobel卷积核,卷积核shape为(out_channels, in_channels, kernel_size, kernel_size) import torch, cv2
import torch.nn.functional as F
import numpy as np
import matplotlib.pyplot as p…