添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
11 dst = cv.pyrDown(temp) 12 pyramid_images.append(dst) 13 cv.imshow( " 高斯金字塔 " + str(i), dst) 14 temp = dst.copy() 15 return pyramid_images 18 #拉普拉斯金字塔 19 def laplian_image(image): 20 pyramid_images = pyramid_image(image) 21 level = len(pyramid_images) 22 for i in range(level- 1 , - 1 , - 1 ): 23 if (i- 1 ) < 0 : 24 expand = cv.pyrUp(pyramid_images[i], dstsize=image.shape[: 2 ]) 25 lpls = cv.subtract(image, expand) 26 cv.imshow( " 拉普拉斯 " + str(i), lpls) 27 else : 28 expand = cv.pyrUp(pyramid_images[i], dstsize=pyramid_images[i- 1 ].shape[: 2 ]) 29 lpls = cv.subtract(pyramid_images[i- 1 ], expand) 30 cv.imshow( " 拉普拉斯 " + str(i), lpls) 32 src = cv.imread( " C://01.jpg " ) 33 cv.imshow( " 原来 " , src) 34 laplian_image(src) 35 cv.waitKey( 0 ) 36 cv.destroyAllWindows()