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

做网站那家好福建百度推广开户

做网站那家好,福建百度推广开户,莘庄做网站,1688免费货源网相关文章 PIL#xff0c;OPENCV之间的转换关系_pil cvtcolor(image)_番茄就要炒鸡蛋的博客-CSDN博客 python GDAL和PIL图像转换_gdal.readasarray和pil_llc的足迹的博客-CSDN博客 一、原始数据 二、分别读取数据 1、gdal读取的array 2、pil读取的array 三、 gdal转pil image … 相关文章 PILOPENCV之间的转换关系_pil cvtcolor(image)_番茄就要炒鸡蛋的博客-CSDN博客 python GDAL和PIL图像转换_gdal.readasarray和pil_llc的足迹的博客-CSDN博客 一、原始数据 二、分别读取数据 1、gdal读取的array  2、pil读取的array   三、 gdal转pil image np.rollaxis(image , 0, 3)  转换结果 总的代码  用gdal库读取tif影像并填充边缘并根据窗口大小滑动裁剪裁剪 ​ def clip_picture(file_path,a):slide_window 1024 # 大的滑动窗口step_length 1024sat_list os.listdir(file_path) for file in sat_list:Image_Path os.path.join(file_path,file)imagegdal.Open(Image_Path)width image.RasterXSizeheight image.RasterYSize# image Image.open(Image_Path)# width image.size[0] # 获取图像的宽# height image.size[1] # 获取图像的高right_fill step_length - (width % step_length)bottom_fill step_length - (height % step_length)width_path_number int((width right_fill) / step_length) # 横向切成的小图的数量height_path_number int((height bottom_fill) / step_length) # 纵向切成的小图的数量#print(width_path_number, height_path_number)# image np.array(image)imageimage.ReadAsArray()if atif:image np.rollaxis(image , 0, 3)image cv2.copyMakeBorder(image, top0, bottombottom_fill, left0, rightright_fill,borderTypecv2.BORDER_CONSTANT, value0)image cv2.copyMakeBorder(image, topstep_length // 2, bottomstep_length // 2, leftstep_length // 2,rightstep_length // 2,borderTypecv2.BORDER_CONSTANT, value0) # 填充1/2步长的外边框# 2.将膨胀后的大图按照滑窗裁剪tar ./dataset/train/targettarimage_crop_addr target # 图像裁剪后存储的文件夹# image Image.fromarray(image) # 将图片格式从numpy转回PILimageImage.fromarray(np.uint8(image))l 0if atif:for j in range(height_path_number):for i in range(width_path_number):box (i * step_length, j * step_length, i * step_length slide_window, j * step_length slide_window)small_image image.crop(box)small_image.save(image_crop_addr file[:-4] ({},{}){:04d}_sat.tif.format(j, i, l), quality95)l l 1if apng:for j in range(height_path_number):for i in range(width_path_number):box (i * step_length, j * step_length, i * step_length slide_window, j * step_length slide_window)small_image image.crop(box)small_image.save(image_crop_addr file[:-4] ({},{}){:04d}_mask.png.format(j, i, l), quality95)l l 1​
http://www.w-s-a.com/news/674005/

相关文章:

  • 购物网站项目介绍软件开发流程的五大步骤
  • 做的网站怎么放在网上2008 iis搭建网站
  • 网站维护服务公司上海兼职网站制作
  • 企业做网站需要多少钱湘潭九华网站
  • 嘉兴建站服务微营销官网
  • 比较好的网页模板网站浦项建设(中国)有限公司网站
  • 有趣的个人网站网页设计与制作的岗位职责
  • 有建设网站的软件吗长沙做网站的公司对比
  • 网站的外链接数中铝长城建设有限公司网站
  • 北京建设网站公司网站建设费用 无形资产
  • 适合seo的建站系统如何建立网页
  • 我想自己建立一个网站给大家分享个永久免费的云服务器
  • 怎样做网站和网站的友情链接官网优化 报价
  • 购买网站空间大小聊城网站空间公司
  • 做像美团淘宝平台网站多少钱开发网站企业
  • 网站建设前期费用二手购物网站策划书
  • dede学校网站百度联盟是什么
  • 献县网站建设网站开发专业定制
  • 龙华做网站yihe kj安徽六安彩礼一般给多少
  • flash网站建设公司我的小程序在哪里找
  • 建网站需要数据库吗如何制作简单的网页链接
  • 杭州设计企业网站高端公司上虞做网站公司
  • 做网站能赚钱么用wordpress搭建知名网站
  • 阿里云服务器网站开发青岛做网站找哪家
  • 凡科做的网站为什么打不开织梦cms仿某作文网站整站源码(带采集)安装数据库
  • 免费h5模板网站模板汽车报价网址
  • 蔡甸网站建设烟台网站建设yt
  • 最流行的网站开发新开的网页游戏平台
  • 暴富建站wordpress 标签分类
  • 搞笑网站源码百度快照替代