import tensorflow as tf
import cv2
print(tf.Session().run(tf.constant('helllo world!')))
print('hello, opencv!')
img = cv2.imread('1.jpg', 1)
cv2.imshow('src', img)
# 压缩存储
cv2.imwrite('test_new.jpg', img)
# 程序暂停
cv2.waitKey(0)
读图如下,并生成test_new.jpg的新图片:
image.png
网友评论