Skip to content

Commit f9c1367

Browse files
committed
test for cv2
1 parent e3f3c16 commit f9c1367

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

爬虫/image.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
# encoding:utf-8
33

44
from PIL import Image
5-
#from matplotlib import pyplot as plt
6-
5+
## Installation for Opencv-python: 'python -m pip install opencv-python'
6+
import cv2
77

88
def show(file_path):
99
with Image.open(file_path) as img:
10-
img.show()
11-
#plt.imshow(img)
10+
#img.show()
11+
cv2.imshow(img)
1212

1313
if __name__ == '__main__':
14-
show('test.jpg')
14+
show('test.bmp')

0 commit comments

Comments
 (0)