22. opencv入门与图像读写

2019-11-12  本文已影响0人  医学工程与科学园地
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
上一篇 下一篇

猜你喜欢

热点阅读