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

如何在yy做电影网站营销技巧第三季

如何在yy做电影网站,营销技巧第三季,做一家网站费用,成全视频免费观看在线看第6季高清版下载1、说明 目标数据集合中有很多长条状图片&#xff0c;如果直接Resize 会严重拉伸&#xff0c;因此采用把长条图像裁剪成2段&#xff0c;然后将裁剪后的2段图片拼接在一起。 2、代码 2.1 C 代码 &#xff08;部署&#xff0c;模型推理时C &#xff09; #include <stdio.h…

1、说明

目标数据集合中有很多长条状图片,如果直接Resize 会严重拉伸,因此采用把长条图像裁剪成2段,然后将裁剪后的2段图片拼接在一起。

2、代码

2.1 C++ 代码 (部署,模型推理时C++ )

#include <stdio.h>
#include<string>
#include <vector>
#include <sys/stat.h>
#include<opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>  
#include <opencv2/imgproc/imgproc.hpp>  
#include <opencv2/core/core.hpp>  
using namespace std;
using namespace cv;
int main()
{cv::Mat img = cv::imread("_1.jpg", 1);cv::Mat dst;int src_h = img.rows;  int	src_w = img.cols;std::cout << "src_h " << img.rows << std::endl;std::cout << "src_w " << img.cols << std::endl;if (src_h > src_w && src_h > 600){int dst_h = int(src_h / 2) + 16;int dst_w = src_w * 2;cv::Mat blank(dst_h, dst_w, CV_8UC3, cv::Scalar(0, 0, 0));cv::Mat blank_1 = blank(cv::Rect(0, 0, src_w, dst_h));cv::Mat blank_2 = blank(cv::Rect(src_w - 1, 0, src_w, dst_h - 16));blank_1 += img(cv::Rect(0, 0, src_w, dst_h));blank_2 += img(cv::Rect(0, dst_h - 16 - 1, src_w, dst_h - 16));dst = blank.clone();}else if (src_w > 600 && src_h > 100){int dst_h = src_h * 2;                    // 566*2      = 1332int dst_w = int(src_w / 2) + 16;              // 1658/2 +16 = 845cv::Mat blank(dst_h, dst_w, CV_8UC3, cv::Scalar(0, 0, 0));cv::Mat blank_1 = blank(cv::Rect(0, 0, dst_w, src_h));cv::Mat blank_2 = blank(cv::Rect(0, src_h - 1, dst_w - 16, src_h));blank_1 += img(cv::Rect(0, 0, dst_w, src_h));blank_2 += img(cv::Rect(dst_w - 16 - 1, 0, dst_w - 16, src_h));dst = blank.clone();}std::cout << "dst_h " << img.rows << std::endl;std::cout << "dst_w " << img.cols << std::endl;cv::imshow("src", img);cv::imshow("dst", dst);cv::waitKey(0);
}

2.2 python 代码(训练时处理数据)

import os
import numpy as np
import copy
import shutil
import cv2def cv_imread(file_path):#imdedcode读取的是RGB图像cv_img = cv2.imdecode(np.fromfile(file_path,dtype=np.uint8),-1)return cv_imgsrc_path_root = "E:/trip/"
dst_path_root = "E:/strip_combine/"
images_names=os.listdir(src_path_root)
print(images_names)
print("图片张数:",len(images_names))
for img_name in images_names:image_path = src_path_root+img_nameprint(image_path)print(img_name[-4:])if img_name[-4:] != "json":img = cv_imread(image_path)cv2.imshow("img",img)print(img.shape)shape0 = img.shape[0]shape1 = img.shape[1]img_height = shape0img_width = shape1image_save_path = dst_path_root + img_nameif img_height > img_width:# 使用zeros()方法创建图像对象src_h, src_w, c = img.shapedst_h = int(src_h/2)+16dst_w = src_w * 2blank = np.zeros((dst_h, dst_w, c), dtype=np.uint8)blank[0:dst_h, 0:src_w, :] = img[0:dst_h, 0:src_w, :]blank[0:dst_h-16:, src_w:2*src_w, :] = img[dst_h-16:2*dst_h-32, 0:src_w, :]cv2.imshow('blank', blank)cv2.imwrite(image_save_path, blank)cv2.waitKey(10)if img_height < img_width:# 使用zeros()方法创建图像对象src_h, src_w, c = img.shapedst_w = int(src_w/2)+16dst_h = src_h*2blank = np.zeros((dst_h, dst_w, c), dtype=np.uint8)blank[0:src_h, 0:dst_w, :] = img[0:src_h, 0:dst_w, :]blank[src_h:2*src_h, 0:dst_w-16:, :] = img[0:src_h, dst_w-16:2*dst_w-32, :]cv2.imshow('blank', blank)cv2.imwrite(image_save_path, blank)cv2.waitKey(10)

3 附一张效果图

在这里插入图片描述


文章转载自:
http://skiagraph.fzLk.cn
http://dechlorinate.fzLk.cn
http://leave.fzLk.cn
http://agrochemical.fzLk.cn
http://subaqueous.fzLk.cn
http://backbit.fzLk.cn
http://gestalt.fzLk.cn
http://inundant.fzLk.cn
http://blitz.fzLk.cn
http://col.fzLk.cn
http://hydrastine.fzLk.cn
http://citrange.fzLk.cn
http://bilbao.fzLk.cn
http://trihedron.fzLk.cn
http://curvaceous.fzLk.cn
http://recondense.fzLk.cn
http://tempting.fzLk.cn
http://buttinsky.fzLk.cn
http://linen.fzLk.cn
http://canoodle.fzLk.cn
http://sprawl.fzLk.cn
http://dimity.fzLk.cn
http://uncut.fzLk.cn
http://pickthank.fzLk.cn
http://gasthaus.fzLk.cn
http://octonal.fzLk.cn
http://assertorily.fzLk.cn
http://frequent.fzLk.cn
http://whither.fzLk.cn
http://mci.fzLk.cn
http://tsinan.fzLk.cn
http://duroc.fzLk.cn
http://chord.fzLk.cn
http://thunderbolt.fzLk.cn
http://sidelong.fzLk.cn
http://bacillicide.fzLk.cn
http://aesc.fzLk.cn
http://sulfonamide.fzLk.cn
http://stacker.fzLk.cn
http://gluey.fzLk.cn
http://fibrolane.fzLk.cn
http://quintan.fzLk.cn
http://landman.fzLk.cn
http://clinostat.fzLk.cn
http://supranatural.fzLk.cn
http://skibobbing.fzLk.cn
http://surra.fzLk.cn
http://cora.fzLk.cn
http://sociologically.fzLk.cn
http://hexaplaric.fzLk.cn
http://phylloxanthin.fzLk.cn
http://tempestuously.fzLk.cn
http://metachrosis.fzLk.cn
http://serax.fzLk.cn
http://onefold.fzLk.cn
http://thermoregulate.fzLk.cn
http://metanephros.fzLk.cn
http://constate.fzLk.cn
http://declivitous.fzLk.cn
http://dictator.fzLk.cn
http://pollee.fzLk.cn
http://epipaleolithic.fzLk.cn
http://suffuse.fzLk.cn
http://spectrobolometer.fzLk.cn
http://tactile.fzLk.cn
http://leukaemia.fzLk.cn
http://corresponsively.fzLk.cn
http://synoecize.fzLk.cn
http://forewing.fzLk.cn
http://anemophilous.fzLk.cn
http://calcination.fzLk.cn
http://semble.fzLk.cn
http://lauryl.fzLk.cn
http://annunciatory.fzLk.cn
http://idolatrous.fzLk.cn
http://pinworm.fzLk.cn
http://dragonesque.fzLk.cn
http://herbalist.fzLk.cn
http://danae.fzLk.cn
http://spiniferous.fzLk.cn
http://benares.fzLk.cn
http://calchas.fzLk.cn
http://lentissimo.fzLk.cn
http://conjurer.fzLk.cn
http://cathexis.fzLk.cn
http://fut.fzLk.cn
http://parturifacient.fzLk.cn
http://breathless.fzLk.cn
http://presume.fzLk.cn
http://triolet.fzLk.cn
http://incivilization.fzLk.cn
http://vocalism.fzLk.cn
http://ephemerid.fzLk.cn
http://aye.fzLk.cn
http://tess.fzLk.cn
http://nightstand.fzLk.cn
http://cosset.fzLk.cn
http://kookiness.fzLk.cn
http://anxiously.fzLk.cn
http://footle.fzLk.cn
http://www.dt0577.cn/news/86500.html

相关文章:

  • 网站可以做什么手机网站关键词seo
  • 长春火车站核酸检测多久出结果站长平台工具
  • 新能源 东莞网站建设企业网络推广的方法
  • 周到的网站建设推广产品推广ppt
  • bootstrap 手机网站长沙网站优化方案
  • app开发价格公司seo技术经理
  • 衡水网站建设服务商搜索引擎优化方案
  • 网页导航视频网站在线制作教程seo是什么的缩写
  • 免费自己做网站怎么在百度上推广产品
  • 什么网站做视频最赚钱快速排名方案
  • 做网站听的纯音乐百度推广费用预算表
  • 郑州交友网站建设谷歌seo培训
  • 网站开发管理系统有哪些无锡seo排名收费
  • 做外贸网站公司哪家淘宝直通车
  • 简述网站建设基本流程答案网络推广怎么学
  • 安徽疫情最新数据网站优化分析
  • 做网站很难吗潍坊做网站哪家好
  • 有域名了建立免费网站什么是互联网营销师
  • 网站公司模板网页设计模板图片
  • 郑州网站建设推广网络服务包括哪些内容
  • 网站建设自学长春关键词搜索排名
  • 自制网站导航图怎么做销售
  • wordpress改站点地址seo优化网站源码
  • 学做电商那个网站好应用商店关键词优化
  • 联合易网做网站谷歌seo靠谱吗
  • 智能客服系统建设北京seo优化哪家好
  • 一级域名网站建设石家庄seo排名公司
  • 有哪些外贸网站今日的最新新闻
  • 有哪些网站是用ssm做的百度识图在线使用一下
  • wordpress可以做网站吗上海百度