打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
tf.image 中间开始切图片,一定大小 tf.image.resize_image_with_crop_or_pad
# -*- coding:utf-8 -*-
import tensorflow as tf
import cv2


img=cv2.imread(filename="234.jpg")

img2 = tf.image.resize_image_with_crop_or_pad(img, target_height=200, target_width=300)


with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
print (img.shape)
cv2.imshow("img",img)
img2=sess.run(img2)
print ("*********************")
cv2.imshow("img2", img2)
print ("ok")

cv2.waitKey(0)

 
 



本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
在C#下使用TensorFlow.NET训练自己的数据集
一次不太成功的项目实战:HOG特征+SVM实现交通标志的检测
图像数据增强——谈谈Opencv
windows10 64bit 下的tensorflow 安装及demo
教程 | 经得住考验的「假图片」:用TensorFlow为神经网络生成对抗样本
OpenCV-Python图像的缩放、翻转和旋转
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服