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

做ppt用什么网站好/安徽百度seo公司

做ppt用什么网站好,安徽百度seo公司,山东住房建设部官方网站,wordpress 企业主题安装后不一样这一节的内容就是把深度图转换为彩色图,然后不再使用硬解码,而是继续采用sdk里面封装好的功能来减少测量的误差,以及避免转换为灰度图时,出现绿巨人时候的掉针的bug. 下面直接贴代码吧。 private byte[]convertDepthFrameToColorF…

       这一节的内容就是把深度图转换为彩色图,然后不再使用硬解码,而是继续采用sdk里面封装好的功能来减少测量的误差,以及避免转换为灰度图时,出现绿巨人时候的掉针的bug.

      下面直接贴代码吧。

private byte[]convertDepthFrameToColorFrame2(short[] depthFrame,DepthImageStream depthSteam){byte[] depthFrame32 = new byte[depthSteam.FrameWidth * depthSteam.FrameHeight * Bgr32BytesPerPixel];//通过常量获得有效视距,不用硬解码(就是自己定义距离)int tooNearDepth = depthSteam.TooNearDepth;int tooFarDepth = depthSteam.TooFarDepth;int unknownDepth = depthSteam.UnknownDepth;for(int i16=0,i32=0;i16<depthFrame.Length&&i32<depthFrame32.Length;i16++,i32+=4){int player = depthFrame[i16] & DepthImageFrame.PlayerIndexBitmask;int realDepth = depthFrame[i16] >> DepthImageFrame.PlayerIndexBitmaskWidth;//通过位运算,将13位的深度图,裁剪为8位,对于显示足够了。byte intensity = (byte)(~(realDepth >> 4));if(player==0&&realDepth==0){//白色depthFrame32[i32 + RedIndex] = 255;depthFrame32[i32 + GreenIndex] = 255;depthFrame32[i32 + BlueIndex] = 255;}else if(player==0&&realDepth==tooFarDepth){//深紫色depthFrame32[i32 + RedIndex] = 66;depthFrame32[i32 + GreenIndex] = 0;depthFrame32[i32 + BlueIndex] = 66;}else if (player == 0 && realDepth == unknownDepth){//深棕色depthFrame32[i32 + RedIndex] = 66;depthFrame32[i32 + GreenIndex] = 66;depthFrame32[i32 + BlueIndex] = 33;}else{depthFrame32[i32 + RedIndex] = (byte)(intensity >> IntensityShiftByPlayerR[player]);depthFrame32[i32 + GreenIndex] = (byte)(intensity >> IntensityShiftByPlayerG[player]);depthFrame32[i32 + BlueIndex] = (byte)(intensity >> IntensityShiftByPlayerB[player]);}}return depthFrame32;}
void _kinect_DepthFrameReady(object sender, DepthImageFrameReadyEventArgs e){using(DepthImageFrame depthFrame = e.OpenDepthImageFrame()){if(depthFrame!=null){short[] depthPixelData = new short[depthFrame.PixelDataLength];depthFrame.CopyPixelDataTo(depthPixelData);byte[] pixels = this.convertDepthFrameToColorFrame2(depthPixelData, ((KinectSensor)sender).DepthStream);int stride = depthFrame.Width * 4;imageDepth.Source = BitmapSource.Create(depthFrame.Width, depthFrame.Height, 96, 96, PixelFormats.Bgr32, null, pixels, stride);}}}

再附上效果图

image

转载于:https://www.cnblogs.com/BlueMountain-HaggenDazs/p/4107275.html

http://www.jmfq.cn/news/5008627.html

相关文章:

  • 做镜像网站/成都有实力的seo团队
  • 福永网站推广/谷歌seo优化技巧
  • 手机app网站/爱站长尾词挖掘工具
  • 我的世界外国做图网站/优化设计答案大全英语
  • 制作相册怎么做/seo搜索引擎优化原理
  • 网站建设丶金手指C排名15/免费推广app软件下载
  • 泰安做网站建设的公司/宽带营销策略
  • 一搜同志网站建设电话/外包公司是正规公司吗
  • 网站开发课程知识点总结/白城seo
  • 第寒网站建设/品牌营销策略分析
  • 个人网站在那建设/信息推广
  • 哪个旅游网站规划好/经典的软文广告
  • 物业公司网站设计/seo网站优化培训多少价格
  • 网站首页介绍/seo是网络优化吗
  • 做网站收录真的假的/百度做广告推广怎么样
  • 做物流网站/查询seo
  • 上海闸北城市建设有限公司网站/推广形式有哪几种
  • 90设计官方网站/引流推广的句子
  • 西安抖音运营/河南整站百度快照优化
  • 宁波网站建设相信荣胜网络/seo优化服务是什么意思
  • 网站推广机构/广告网络推广怎么做
  • 如何本地搭建自己的网站/属性词 关键词 核心词
  • 查法人信息的网站/网站链接提交
  • 南宁网站建设醉懂网络/百度关键词排名神器
  • 织梦怎么修改网站标题/微信如何投放广告
  • 网站有哪些区别是什么/文军seo
  • 北京建筑网/seo是什么牌子
  • 河南网站建设报价/徐州百度seo排名优化
  • 建设一个网站的所有代码/百度趋势搜索大数据
  • 济南做平台网站的/软文推广经典案例