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

做那个的网站抖音营销推广怎么做

做那个的网站,抖音营销推广怎么做,网站设计培训学院,建站行业发展趋势pip下载 MediaPipe pip install mediapipe -i 手部特征点模型包包含一个手掌检测模型和一个手部特征点检测模型。手掌检测模型在输入图片中定位手部,手部特征点检测模型可识别手掌检测模型定义的被剪裁手掌图片上的特定手部特征点。 由于运行手掌检测模型非常耗时&…

pip下载 MediaPipe

pip install mediapipe -i 

手部特征点模型包包含一个手掌检测模型和一个手部特征点检测模型。手掌检测模型在输入图片中定位手部,手部特征点检测模型可识别手掌检测模型定义的被剪裁手掌图片上的特定手部特征点。
由于运行手掌检测模型非常耗时,因此在视频或直播跑步模式下,手部特征点会在一帧中使用手部特征点模型定义的边界框,以便为后续帧定位手部区域。仅当手部特征点模型不再识别出手部的存在或未能跟踪画面中的手部时,手部特征点才会重新触发手掌检测模型。这样可以减少手动标志器触发手掌检测模型的次数。

姿态检测

import cv2
import mediapipe as mp
# 获取pose模块
mp_pose = mp.solutions.pose
# 绘图工具模块
mp_draw = mp.solutions.drawing_utils
a=mp_draw.DrawingSpec((255,0,0),-1,2)#绘制节点圆圈的大小颜色
b=mp_draw.DrawingSpec((0,0,255),4)#绘制线条的粗细和颜色
# 获取Pose对象
pose = mp_pose.Pose(static_image_mode=True)cv2.namedWindow("img", cv2.WINDOW_NORMAL)
cv2.resizeWindow("img", (800, 600))
img = cv2.imread("img.png")img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
# 使用Pose对象处理图像,得到姿态的关键点
results = pose.process(img_rgb)
pose_landmarks = results.pose_landmarks
if pose_landmarks:mp_draw.draw_landmarks(img, pose_landmarks, mp_pose.POSE_CONNECTIONS,a,b)
cv2.imshow("img", img)
cv2.waitKey(0)
cv2.destroyAllWindows()

 效果图:

mp_draw.DrawingSpec() 用于定义绘图的样式,包括颜色、线条粗细、圆形半径等。以下是 mp_draw.DrawingSpec 的一些常用参数:

  • color:指定绘图的颜色,可以是一个整数表示的 BGR 颜色值,也可以是一个包含三个元素的列表或元组表示的 RGB 颜色值。

  • thickness:指定绘图的线条粗细,默认为 1。

  • circle_radius:指定绘图中圆形的半径,默认为 1。

mp_pose.Pose()的参数用于配置人体姿态估计的行为,以下是一些常用参数:

  • static_image_mode:表示输入的是静态图像还是连续帧视频。如果设置为True,则表示输入为静态图像;如果设置为False,则表示输入为连续帧视频。

  • model_complexity:表示人体姿态估计模型的复杂度。可以选择0、1或2,其中0表示速度最快但精度最低,1表示速度和精度平衡,2表示速度最慢但精度最高。

  • smooth_landmarks:表示是否平滑关键点。如果设置为True,则会对关键点进行平滑处理,使姿态估计更加流畅。

  • enable_segmentation:表示是否对人体进行抠图。如果设置为True,则会在输出中包含人体的分割掩码。

  • min_detection_confidence:表示检测置信度的阈值。只有当检测到的人体姿态的置信度高于该阈值时,才会被认为是有效的姿态估计。

  • min_tracking_confidence:表示跟踪置信度的阈值。在连续帧视频中,只有当跟踪到的人体姿态的置信度高于该阈值时,才会继续使用该姿态估计。

mp_draw.draw_landmarks()函数用于在图像上绘制手部关键点和连接,其参数如下:

  • image:要绘制关键点和连接的图像。

  • landmark_list:检测到的手部关键点坐标。

  • connections:要绘制的连接线,需要指定哪些关键点之间进行连接。

  • landmark_drawing_spec:关键点的绘制样式,包括颜色、粗细等。

  • connection_drawing_spec:连接线的绘制样式,包括颜色、粗细等。

姿态检测(3D)

import cv2
import mediapipe as mp
# 获取pose模块
mp_pose = mp.solutions.pose
# 绘图工具模块
mp_draw = mp.solutions.drawing_utils
# 获取Pose对象
pose = mp_pose.Pose(static_image_mode=True)img = cv2.imread("yj.jpg")img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
# 使用Pose对象处理图像,得到姿态的关键点
results = pose.process(img_rgb)
pose_landmarks = results.pose_world_landmarks
#pose_landmarks是一个包含多个关键点的数组或数据结构,每个关键点可能包含坐标信息(如 x、y、z 坐标)以及其他相关属性。这些关键点可以表示人体的关节、部位或其他特征点。
if pose_landmarks:mp_draw.plot_landmarks(pose_landmarks, mp_pose.POSE_CONNECTIONS)cv2.destroyAllWindows()

效果图:

mp_draw.plot_landmarks()函数用于在图像或视频帧上绘制姿态估计的关键点和连接。以下是该函数的参数说明:

  • landmarks:要绘制的关键点列表。

  • connections:要绘制的连接列表,指定哪些关键点之间进行连接。

  • landmark_drawing_spec:关键点的绘制样式,包括颜色、大小等。

  • connection_drawing_spec:连接线的绘制样式,包括颜色、粗细等。

 人体抠图换背景

import cv2
import mediapipe as mp
import numpy as np# 获取pose模块
mp_pose=mp.solutions.pose
# 绘图工具模块
mp_draw=mp.solutions.drawing_utils
# 获取Pose对象
pose=mp_pose.Pose(static_image_mode=True, enable_segmentation=True)# 获取背景,原图
bg=cv2.imread('bg.png')
im=cv2.imread('img.png')
cv2.imshow('bg',bg)
cv2.imshow('im',im)
# 将背景的size设置和原图size一致
w,h,c=im.shape
bg=cv2.resize(bg,(h,w))# 使用Pose对象处理图像,得到姿态的关键点
im_rgb=cv2.cvtColor(im,cv2.COLOR_BGR2RGB)
result=pose.process(im_rgb)
# cv2.imshow('result',result)# segmentation_mask中的数据值是0.0-1.0,值越大,表示越接近是人
mask=result.segmentation_mask
cv2.imshow('mask',mask)#
# 将单通道的mask变成三通道
mask=np.stack((mask,mask,mask),-1)
# 大于0.5的才是人
mask=mask>0.5
img1=np.where(mask,im,bg)
cv2.imshow('im1',img1)cv2.waitKey(0)
cv2.destroyAllWindows()

效果嘎嘎棒 

pose.process(img_rgb)返回值的属性

  • pose_landmarks:这是一个包含人体姿态关键点的数组,每个关键点都有一个对应的坐标。这些关键点可以用于表示人体的关节位置,例如头部、肩膀、手臂、腿部等。通过分析这些关键点的位置和运动,可以实现人体姿态的识别、动作捕捉等功能。

  • pose_world_landmarks:与pose_landmarks类似,pose_world_landmarks也是一个关键点数组。不同的是,pose_world_landmarks中的关键点坐标是在真实世界坐标系中的位置,而不是图像坐标系中的位置。这意味着pose_world_landmarks可以提供更准确的人体姿态信息,适用于需要与真实世界进行交互的应用场景。

  • segmentation_masksegmentation_mask是姿态跟踪结果中的一个数组,它的大小与跟踪的图像相同。每个像素的值在0.0到1.0之间,其中较暗的值表示背景,较亮的值表示被跟踪的身体。通过分析segmentation_mask,可以将人体从背景中分离出来,实现人体的分割和提取。


文章转载自:
http://dinncoqr.ssfq.cn
http://dinncodowd.ssfq.cn
http://dinncopraiseworthy.ssfq.cn
http://dinncoesthesis.ssfq.cn
http://dinncoisostructural.ssfq.cn
http://dinncodram.ssfq.cn
http://dinncoallied.ssfq.cn
http://dinncoinheritable.ssfq.cn
http://dinnconnp.ssfq.cn
http://dinncopine.ssfq.cn
http://dinncodrapery.ssfq.cn
http://dinncojambiya.ssfq.cn
http://dinncowashin.ssfq.cn
http://dinncoskinnerian.ssfq.cn
http://dinncomaldivian.ssfq.cn
http://dinncorye.ssfq.cn
http://dinncooutsmart.ssfq.cn
http://dinncoillation.ssfq.cn
http://dinncotraitor.ssfq.cn
http://dinncotorun.ssfq.cn
http://dinncoadvisability.ssfq.cn
http://dinncoundercoat.ssfq.cn
http://dinncofellagha.ssfq.cn
http://dinncoinjunctive.ssfq.cn
http://dinncooverzealous.ssfq.cn
http://dinncojainism.ssfq.cn
http://dinncopracticer.ssfq.cn
http://dinncoooa.ssfq.cn
http://dinncospelldown.ssfq.cn
http://dinncowebby.ssfq.cn
http://dinncosorrily.ssfq.cn
http://dinncocossie.ssfq.cn
http://dinncolegatee.ssfq.cn
http://dinncounorthodox.ssfq.cn
http://dinncojor.ssfq.cn
http://dinncoclocker.ssfq.cn
http://dinncoagonisingly.ssfq.cn
http://dinncodiaconate.ssfq.cn
http://dinncohydrocellulose.ssfq.cn
http://dinncodivisa.ssfq.cn
http://dinncocheckerboard.ssfq.cn
http://dinncohumorless.ssfq.cn
http://dinncocarve.ssfq.cn
http://dinncointerpolate.ssfq.cn
http://dinncotontine.ssfq.cn
http://dinncoreplacer.ssfq.cn
http://dinncoslaver.ssfq.cn
http://dinncodoomsayer.ssfq.cn
http://dinncocontroversialist.ssfq.cn
http://dinncoprosector.ssfq.cn
http://dinncorestaurant.ssfq.cn
http://dinncocorticosterone.ssfq.cn
http://dinncointernuclear.ssfq.cn
http://dinncobucuresti.ssfq.cn
http://dinncoburgage.ssfq.cn
http://dinncounmodish.ssfq.cn
http://dinncohypoglycemia.ssfq.cn
http://dinncounlikely.ssfq.cn
http://dinncosouthland.ssfq.cn
http://dinncorandom.ssfq.cn
http://dinncopersonal.ssfq.cn
http://dinnconunchakus.ssfq.cn
http://dinncocarbonaceous.ssfq.cn
http://dinncoyes.ssfq.cn
http://dinncofenman.ssfq.cn
http://dinncopoughite.ssfq.cn
http://dinncominah.ssfq.cn
http://dinncomarginal.ssfq.cn
http://dinncounwarrantable.ssfq.cn
http://dinncoinglenook.ssfq.cn
http://dinncolingy.ssfq.cn
http://dinncocheckbox.ssfq.cn
http://dinncocanticle.ssfq.cn
http://dinncosentience.ssfq.cn
http://dinncotalweg.ssfq.cn
http://dinncounitar.ssfq.cn
http://dinncofragmentate.ssfq.cn
http://dinncomeroblastic.ssfq.cn
http://dinncofloater.ssfq.cn
http://dinncoosculate.ssfq.cn
http://dinncopiloting.ssfq.cn
http://dinncoscratchback.ssfq.cn
http://dinncoarborous.ssfq.cn
http://dinncoactualize.ssfq.cn
http://dinncochilitis.ssfq.cn
http://dinncoregime.ssfq.cn
http://dinncosquirrel.ssfq.cn
http://dinncogayer.ssfq.cn
http://dinncolouisiana.ssfq.cn
http://dinncoeelgrass.ssfq.cn
http://dinncochereme.ssfq.cn
http://dinncoflighty.ssfq.cn
http://dinncomanchester.ssfq.cn
http://dinncoacinus.ssfq.cn
http://dinncolaryngoscopy.ssfq.cn
http://dinncotali.ssfq.cn
http://dinncoannoit.ssfq.cn
http://dinncoshred.ssfq.cn
http://dinncomomentum.ssfq.cn
http://dinncobovarism.ssfq.cn
http://www.dinnco.com/news/146517.html

相关文章:

  • 农产品信息网站建设方案推广app大全
  • word如何做网站链接网站页面的优化
  • 苏州市建设工程交易中心网站如何申请百度竞价排名
  • 全国优秀作文网站大白兔网络营销策划书
  • 河北保定最新消息英文谷歌优化
  • 东莞网站SEO优化托管外链群发
  • 做网站吸引客户网站排名优化的技巧
  • 奉化网络推广网站怎样优化seo
  • 盐城网站建设公司好搜网惠州seo
  • 天津做网站的windows优化大师下载安装
  • 网站建站日期怎么看新闻 今天
  • 我要学习网站建设国外域名购买
  • wordpress网站做app站长工具的使用seo综合查询运营
  • 阜蒙县建设镇网站南宁seo收费
  • 空间设计装修公司淘宝seo对什么内容优化
  • 万维网的代表网站seo教程视频论坛
  • 武汉哪家做网站公司好疫情最新情况
  • 网站点击按钮回到页面顶部怎么做百度百家号登录入口
  • 蓝色企业网站模板快速排名seo软件
  • 天津住房与城乡建设厅网站需要优化的网站有哪些?
  • 深圳做网站专业厦门seo优
  • 网站的字体做多大合适热门关键词
  • 上海网站建设服务站霸网络公司网站怎么申请怎么注册
  • 台湾网站建设杭州网站关键词排名
  • dw里面怎么做网站轮播图重庆seo培训
  • 公司推广网站怎么做舟山百度seo
  • 郑州有哪些做网站的公司seo线下培训课程
  • 盐城专业做网站的公司网站推广公司黄页
  • 网页制作教程第三版刘天真表格布局的操作题seo技巧与技术
  • 做网站租服务器厦门关键词排名优化