reference_opencv实现高斯核
reference_MATLAB_fspecial函数说明

# MATLAB
H = fspecial('Gaussian', [r, c], sigma);
# opencv-python
# cv2.getGaussianKernel(r, sigma)返回一个shape为(r, 1)的np.ndarray, fspecial里核的size的参数是先行后列, 因此:
H = np.multiply(cv2.getGaussianKernel(r, sigma), (cv2.getGaussianKernel(c, sigma)).T)  # H.shape == (r, c)

相关文章:

  • 2021-05-29
  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
  • 2021-09-08
  • 2021-05-05
  • 2021-10-06
猜你喜欢
  • 2022-12-23
  • 2021-08-13
  • 2021-09-13
  • 2021-07-29
  • 2022-12-23
  • 2022-02-15
  • 2022-12-23
相关资源
相似解决方案