python X光片读取(OpenCV+matplotlib)

import cv2 as cv, matplotlib.pyplot as plt
def show(filename):
image = cv.imread(filename)
plt.title("KidBoneImage")
plt.imshow(image)
if __name__ == '__main__':
FileName1 = "1.png"
plt.subplot(2,2,1)
show(FileName1)
plt.subplot(2,2,2)
FileName2 = "2.png"
show(FileName2)
plt.subplot(2, 2, 3)
FileName3 = "3.png"
show(FileName3)
plt.subplot(2, 2, 4)
FileName4 = "4.png"
show(FileName4)
plt.show()

 

原文地址:https://www.cnblogs.com/D007/p/14529475.html