当前位置: 首页 > news >正文

劳力士手表网站免费可商用的cms

劳力士手表网站,免费可商用的cms,郑州市哪里有网站建设,wordpress 插件模板有时候为了方便对比不同文件夹中同名图片#xff0c;需要拼接在一起#xff0c;这里提供一个拼接方法#xff0c;当然不同命文件也可以实现拼接#xff0c;稍微改改就能实现 如下图#xff0c;在文件夹中有五个文件夹中的图片需要拼接#xff0c;拼接后的图片存放在img_…有时候为了方便对比不同文件夹中同名图片需要拼接在一起这里提供一个拼接方法当然不同命文件也可以实现拼接稍微改改就能实现 如下图在文件夹中有五个文件夹中的图片需要拼接拼接后的图片存放在img_hebing 代码如下为了隐去了一些项目私密信息 import warnings warnings.filterwarnings(ignore) import matplotlib.pyplot as plt from matplotlib import cm as CM import matplotlib.gridspec as gridspec import os import glob import numpy as np import scipy.io as scio from scipy.io import loadmat from PIL import Image; import cv2 import torch from torchvision import transformsDATA_PATH fD:/TEST/image_test/img_path1 glob.glob(os.path.join(DATA_PATH, four_visualization_1, *.png)) img_path2 glob.glob(os.path.join(DATA_PATH, four_visualization_2, *.png)) img_path3 glob.glob(os.path.join(DATA_PATH, four_visualization_3, *.png)) img_path4 glob.glob(os.path.join(DATA_PATH, four_visualization_4, *.png)) img_path5 glob.glob(os.path.join(DATA_PATH, four_visualization_5, *.png)) save_path fD:/TEST/image_test/img_hebing img_path1.sort() img_path2.sort() img_path3.sort() img_path3.sort() img_path5.sort() for idx in range(0, len(img_path3)):img_path img_path3[idx]filename img_path.split(/)[-1].split(\\)[-1].split(.)[0].split(_)[2:-1]filename _.join(filename) # 文件名# 读取图像img1 cv2.imread(img_path1[idx])img2 cv2.imread(img_path2[idx]) img3 cv2.imread(img_path3[idx])img4 cv2.imread(img_path4[idx])img5 cv2.imread(img_path5[idx])# 获取图像高度和宽度height0, width0 img1.shape[:2]height1, width1 img2.shape[:2]height2, width2 img3.shape[:2]height3, width3 img4.shape[:2] height4, width4 img5.shape[:2]# 获取最宽宽度max_width max(width0, width1, width2, width3, width4)# 计算放大倍率scaling_factor0 max_width / width0scaling_factor1 max_width / width1scaling_factor2 max_width / width2scaling_factor3 max_width / width3scaling_factor4 max_width / width4# 调整图像大小并进行比例放大image0_resized cv2.resize(img1, (max_width, int(height0 * scaling_factor0)))image1_resized cv2.resize(img2, (max_width, int(height1 * scaling_factor1)))image2_resized cv2.resize(img3, (max_width, int(height2 * scaling_factor2)))image3_resized cv2.resize(img4, (max_width, int(height3 * scaling_factor3))) image4_resized cv2.resize(img5, (max_width, int(height4 * scaling_factor4)))# 拼接combined_iamge np.vstack((image4_resized, image2_resized, image3_resized, image0_resized, image1_resized))# 安装路径保存cv2.imwrite(os.path.join(save_path, {}.png.format(filename)), combined_iamge) 拼接好的图像示例如下当然这是垂直拼接要是水平拼接换一下hastack函数放大倍率换成高度对比就好了
http://www.pierceye.com/news/13648/

相关文章:

  • 潍坊做网站公司漯河市建设监理协会网站
  • 学校网站的建设目标是什么意思广州 创意的网站设计
  • 怎么做网站360图片链接众创空间网站建设
  • 网站用户管理体系国网法治建设网站
  • 中国服务器在外国网站有哪些郑州博大泌尿外科医院
  • zhi做网站电影网站模板源代码
  • 咖啡网站建设做哪种网站赚钱
  • h5case是什么网站wordpress 弹幕插件
  • 网站首图怎么做wordpress型营销
  • 合肥专业商业网站网站建设价格差异好大
  • 贵阳网站制作服务商网站注册查询
  • 湘潭建设路街道网站wordpress themeforest
  • 时光轴网站模板企业网站首页布局设计
  • 设计个网站要多少钱数字短链接生成
  • 门户网站整改情况报告有源码做网站
  • 网站后台里有网页代码没网校网站建设多少钱
  • php网站建设工程师下载关键词推广软件
  • 网站营销设计专业网页制作软件能帮助用户组织和管理
  • 京东商城的网站建设ui设计怎么弄
  • 网站建设一点通南京专业做网站公司地址
  • 网站开发的基础课程wordpress 无法安装
  • 重庆网站页面优化嘉定网站建设
  • 坪山商城网站建设哪家便宜网络推广的重要性与好处
  • 南京网站建设学习免费网站登陆模板
  • 桂林设计单位资质升级网站乐清定制网站建设
  • wordpress站内搜索镇江网站seo公司
  • 网络规划设计师吧seo公司排名榜
  • 福州正规网站建设公司推荐丹阳市房产信息网
  • 小程序商城图片素材网站优化 价格查询
  • 做网站的那个语言好九江网站建设张旭