在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…
Sobel边缘检测算子数学原理再学习
一.Sobel数学原理分析 参考《History and Definition of the so-called "Sobel Operator",more appropriately named the Sobel-Feldman Operator》,《Expansion and Implementation of a 3x3 Sobel and Prewitt Edge D…