数字图像处理第一次作业
1.直方图自适应均衡化 cv2.createCLAHA
https://blog.csdn.net/weixin_33970449/article/details/93879283
2.椒盐噪声
https://www.jianshu.com/p/4ae5e8cef9ae
3.Sobel算子
https://blog.csdn.net/huanhuanq1209/article/details/79845061
4.显示子图的两种方法
img_all = np.hstack([img, x, y,result])
plt.figure(figsize=(30, 10))
plt.imshow(img_all[:, :, ::-1])
plt.show()
plt.subplot(2, 2, 1)
plt.imshow(img, 'gray')
# 其中gray表示将图片用灰度的方式显示,注意需要使用引号表示这是string类型。
# 可以用本行命令显示'gray'的类型:print(type('gray'))
plt.title('src')
plt.subplot(2, 2, 2)
plt.imshow(x, 'gray')
plt.title('sobelX')
plt.subplot(2, 2, 3)
plt.imshow(y, 'gray')
plt.title('sobelY')
plt.subplot(2, 2, 4)
plt.imshow(result, 'gray')
plt.title('sobelXY')
plt.show()