opencv3.3+TensorFlow+python3.5安装
import tensorflow as tfimport cv2
image = cv2.imread("F:/image.jpg")
cv2.namedWindow('image', 0)
cv2.imshow('image', image)
# Create a TensorFlow Variable
x = tf.Variable(image, name='x')
model = tf.global_variables_initializer()
with tf.Session() as session:
x = tf.transpose(x, perm=)#将图像数据转置
session.run(model)
result = session.run(x)
cv2.namedWindow('result', 0)
cv2.imshow('result', result)
cv2.waitKey(0)
页:
[1]