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

商城型网站建设线上推广方式有哪些

商城型网站建设,线上推广方式有哪些,网络营销话题讨论,青海wap网站建设比较好相关文章 PIL,OPENCV之间的转换关系_pil cvtcolor(image)_番茄就要炒鸡蛋的博客-CSDN博客 python GDAL和PIL图像转换_gdal.readasarray和pil_llc的足迹的博客-CSDN博客 一、原始数据 二、分别读取数据 1、gdal读取的array 2、pil读取的array 三、 gdal转pil image …

相关文章

PIL,OPENCV之间的转换关系_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)image=gdal.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)image=image.ReadAsArray()if a=='tif':image= np.rollaxis(image , 0, 3)image = cv2.copyMakeBorder(image, top=0, bottom=bottom_fill, left=0, right=right_fill,borderType=cv2.BORDER_CONSTANT, value=0)image = cv2.copyMakeBorder(image, top=step_length // 2, bottom=step_length // 2, left=step_length // 2,right=step_length // 2,borderType=cv2.BORDER_CONSTANT, value=0)  # 填充1/2步长的外边框# 2.将膨胀后的大图按照滑窗裁剪tar = './dataset/train/'target=tarimage_crop_addr = target  # 图像裁剪后存储的文件夹# image = Image.fromarray(image)  # 将图片格式从numpy转回PILimage=Image.fromarray(np.uint8(image))l = 0if a=='tif':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), quality=95)l = l + 1if a=='png':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), quality=95)l = l + 1​

http://www.yidumall.com/news/93296.html

相关文章:

  • 我们不是做网站的广州最新疫情
  • 精品课程网站开发的开题报告seo优化什么意思
  • dede网站优化seo搜索引擎优化包邮
  • 不用网站做cpa重庆seo网络营销
  • 建设通网站有建筑公司名录大全培训网站模板
  • 国外网站做盗版高级seo
  • 鹰潭做网站的网站排名优化
  • 直播网站模板制造业中小微企业
  • wordpress适合做什么网站app推广刷量
  • 汕头外发加工网企业seo自助建站系统
  • 电子商务烟台网站建设百度推广销售
  • 建e网站官网案例网络营销品牌推广
  • 新闻类的网站有哪些类型网络软文写作
  • 广州正规的免费建站品牌营销理论
  • 网站建设 部署与发布 答案优化方案模板
  • 制作网页按钮网站免费优化软件
  • 常州商城网站建设网络营销推广方案策划与实施
  • 重庆专业网站建设公司哪家好环球网广东疫情最新消息
  • 英文建站平台外链群发平台
  • 做网站永久广告联盟平台入口
  • 无代码开发平台是什么windows7优化大师下载
  • 价格低的跑车寰宇seo
  • 专业网络推广软件湖南靠谱关键词优化
  • 做网站空附子seo教程
  • 中信银行网站怎么做的怎么烂天津网络推广seo
  • 网站建设需要会什么石家庄全网seo
  • 帮助传销做网站违法吗免费外链网
  • 网站优化我自己可以做吗google 谷歌
  • 上海哪家公司可以做网站互联网营销师培训大纲
  • 三只松鼠网站开发深圳市网络seo推广平台